{-# 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.SchemaExtensionInfo where
import qualified Amazonka.Core as Core
import Amazonka.DirectoryService.Types.SchemaExtensionStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SchemaExtensionInfo = SchemaExtensionInfo'
{
SchemaExtensionInfo -> Maybe Text
directoryId :: Prelude.Maybe Prelude.Text,
SchemaExtensionInfo -> Maybe Text
schemaExtensionId :: Prelude.Maybe Prelude.Text,
SchemaExtensionInfo -> Maybe Text
schemaExtensionStatusReason :: Prelude.Maybe Prelude.Text,
SchemaExtensionInfo -> Maybe SchemaExtensionStatus
schemaExtensionStatus :: Prelude.Maybe SchemaExtensionStatus,
SchemaExtensionInfo -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
SchemaExtensionInfo -> Maybe POSIX
endDateTime :: Prelude.Maybe Core.POSIX,
SchemaExtensionInfo -> Maybe POSIX
startDateTime :: Prelude.Maybe Core.POSIX
}
deriving (SchemaExtensionInfo -> SchemaExtensionInfo -> Bool
(SchemaExtensionInfo -> SchemaExtensionInfo -> Bool)
-> (SchemaExtensionInfo -> SchemaExtensionInfo -> Bool)
-> Eq SchemaExtensionInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SchemaExtensionInfo -> SchemaExtensionInfo -> Bool
$c/= :: SchemaExtensionInfo -> SchemaExtensionInfo -> Bool
== :: SchemaExtensionInfo -> SchemaExtensionInfo -> Bool
$c== :: SchemaExtensionInfo -> SchemaExtensionInfo -> Bool
Prelude.Eq, ReadPrec [SchemaExtensionInfo]
ReadPrec SchemaExtensionInfo
Int -> ReadS SchemaExtensionInfo
ReadS [SchemaExtensionInfo]
(Int -> ReadS SchemaExtensionInfo)
-> ReadS [SchemaExtensionInfo]
-> ReadPrec SchemaExtensionInfo
-> ReadPrec [SchemaExtensionInfo]
-> Read SchemaExtensionInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SchemaExtensionInfo]
$creadListPrec :: ReadPrec [SchemaExtensionInfo]
readPrec :: ReadPrec SchemaExtensionInfo
$creadPrec :: ReadPrec SchemaExtensionInfo
readList :: ReadS [SchemaExtensionInfo]
$creadList :: ReadS [SchemaExtensionInfo]
readsPrec :: Int -> ReadS SchemaExtensionInfo
$creadsPrec :: Int -> ReadS SchemaExtensionInfo
Prelude.Read, Int -> SchemaExtensionInfo -> ShowS
[SchemaExtensionInfo] -> ShowS
SchemaExtensionInfo -> String
(Int -> SchemaExtensionInfo -> ShowS)
-> (SchemaExtensionInfo -> String)
-> ([SchemaExtensionInfo] -> ShowS)
-> Show SchemaExtensionInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SchemaExtensionInfo] -> ShowS
$cshowList :: [SchemaExtensionInfo] -> ShowS
show :: SchemaExtensionInfo -> String
$cshow :: SchemaExtensionInfo -> String
showsPrec :: Int -> SchemaExtensionInfo -> ShowS
$cshowsPrec :: Int -> SchemaExtensionInfo -> ShowS
Prelude.Show, (forall x. SchemaExtensionInfo -> Rep SchemaExtensionInfo x)
-> (forall x. Rep SchemaExtensionInfo x -> SchemaExtensionInfo)
-> Generic SchemaExtensionInfo
forall x. Rep SchemaExtensionInfo x -> SchemaExtensionInfo
forall x. SchemaExtensionInfo -> Rep SchemaExtensionInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SchemaExtensionInfo x -> SchemaExtensionInfo
$cfrom :: forall x. SchemaExtensionInfo -> Rep SchemaExtensionInfo x
Prelude.Generic)
newSchemaExtensionInfo ::
SchemaExtensionInfo
newSchemaExtensionInfo :: SchemaExtensionInfo
newSchemaExtensionInfo =
SchemaExtensionInfo' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SchemaExtensionStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> SchemaExtensionInfo
SchemaExtensionInfo'
{ $sel:directoryId:SchemaExtensionInfo' :: Maybe Text
directoryId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:schemaExtensionId:SchemaExtensionInfo' :: Maybe Text
schemaExtensionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:schemaExtensionStatusReason:SchemaExtensionInfo' :: Maybe Text
schemaExtensionStatusReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:schemaExtensionStatus:SchemaExtensionInfo' :: Maybe SchemaExtensionStatus
schemaExtensionStatus = Maybe SchemaExtensionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:description:SchemaExtensionInfo' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:endDateTime:SchemaExtensionInfo' :: Maybe POSIX
endDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:startDateTime:SchemaExtensionInfo' :: Maybe POSIX
startDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
schemaExtensionInfo_directoryId :: Lens.Lens' SchemaExtensionInfo (Prelude.Maybe Prelude.Text)
schemaExtensionInfo_directoryId :: (Maybe Text -> f (Maybe Text))
-> SchemaExtensionInfo -> f SchemaExtensionInfo
schemaExtensionInfo_directoryId = (SchemaExtensionInfo -> Maybe Text)
-> (SchemaExtensionInfo -> Maybe Text -> SchemaExtensionInfo)
-> Lens
SchemaExtensionInfo SchemaExtensionInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaExtensionInfo' {Maybe Text
directoryId :: Maybe Text
$sel:directoryId:SchemaExtensionInfo' :: SchemaExtensionInfo -> Maybe Text
directoryId} -> Maybe Text
directoryId) (\s :: SchemaExtensionInfo
s@SchemaExtensionInfo' {} Maybe Text
a -> SchemaExtensionInfo
s {$sel:directoryId:SchemaExtensionInfo' :: Maybe Text
directoryId = Maybe Text
a} :: SchemaExtensionInfo)
schemaExtensionInfo_schemaExtensionId :: Lens.Lens' SchemaExtensionInfo (Prelude.Maybe Prelude.Text)
schemaExtensionInfo_schemaExtensionId :: (Maybe Text -> f (Maybe Text))
-> SchemaExtensionInfo -> f SchemaExtensionInfo
schemaExtensionInfo_schemaExtensionId = (SchemaExtensionInfo -> Maybe Text)
-> (SchemaExtensionInfo -> Maybe Text -> SchemaExtensionInfo)
-> Lens
SchemaExtensionInfo SchemaExtensionInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaExtensionInfo' {Maybe Text
schemaExtensionId :: Maybe Text
$sel:schemaExtensionId:SchemaExtensionInfo' :: SchemaExtensionInfo -> Maybe Text
schemaExtensionId} -> Maybe Text
schemaExtensionId) (\s :: SchemaExtensionInfo
s@SchemaExtensionInfo' {} Maybe Text
a -> SchemaExtensionInfo
s {$sel:schemaExtensionId:SchemaExtensionInfo' :: Maybe Text
schemaExtensionId = Maybe Text
a} :: SchemaExtensionInfo)
schemaExtensionInfo_schemaExtensionStatusReason :: Lens.Lens' SchemaExtensionInfo (Prelude.Maybe Prelude.Text)
schemaExtensionInfo_schemaExtensionStatusReason :: (Maybe Text -> f (Maybe Text))
-> SchemaExtensionInfo -> f SchemaExtensionInfo
schemaExtensionInfo_schemaExtensionStatusReason = (SchemaExtensionInfo -> Maybe Text)
-> (SchemaExtensionInfo -> Maybe Text -> SchemaExtensionInfo)
-> Lens
SchemaExtensionInfo SchemaExtensionInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaExtensionInfo' {Maybe Text
schemaExtensionStatusReason :: Maybe Text
$sel:schemaExtensionStatusReason:SchemaExtensionInfo' :: SchemaExtensionInfo -> Maybe Text
schemaExtensionStatusReason} -> Maybe Text
schemaExtensionStatusReason) (\s :: SchemaExtensionInfo
s@SchemaExtensionInfo' {} Maybe Text
a -> SchemaExtensionInfo
s {$sel:schemaExtensionStatusReason:SchemaExtensionInfo' :: Maybe Text
schemaExtensionStatusReason = Maybe Text
a} :: SchemaExtensionInfo)
schemaExtensionInfo_schemaExtensionStatus :: Lens.Lens' SchemaExtensionInfo (Prelude.Maybe SchemaExtensionStatus)
schemaExtensionInfo_schemaExtensionStatus :: (Maybe SchemaExtensionStatus -> f (Maybe SchemaExtensionStatus))
-> SchemaExtensionInfo -> f SchemaExtensionInfo
schemaExtensionInfo_schemaExtensionStatus = (SchemaExtensionInfo -> Maybe SchemaExtensionStatus)
-> (SchemaExtensionInfo
-> Maybe SchemaExtensionStatus -> SchemaExtensionInfo)
-> Lens
SchemaExtensionInfo
SchemaExtensionInfo
(Maybe SchemaExtensionStatus)
(Maybe SchemaExtensionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaExtensionInfo' {Maybe SchemaExtensionStatus
schemaExtensionStatus :: Maybe SchemaExtensionStatus
$sel:schemaExtensionStatus:SchemaExtensionInfo' :: SchemaExtensionInfo -> Maybe SchemaExtensionStatus
schemaExtensionStatus} -> Maybe SchemaExtensionStatus
schemaExtensionStatus) (\s :: SchemaExtensionInfo
s@SchemaExtensionInfo' {} Maybe SchemaExtensionStatus
a -> SchemaExtensionInfo
s {$sel:schemaExtensionStatus:SchemaExtensionInfo' :: Maybe SchemaExtensionStatus
schemaExtensionStatus = Maybe SchemaExtensionStatus
a} :: SchemaExtensionInfo)
schemaExtensionInfo_description :: Lens.Lens' SchemaExtensionInfo (Prelude.Maybe Prelude.Text)
schemaExtensionInfo_description :: (Maybe Text -> f (Maybe Text))
-> SchemaExtensionInfo -> f SchemaExtensionInfo
schemaExtensionInfo_description = (SchemaExtensionInfo -> Maybe Text)
-> (SchemaExtensionInfo -> Maybe Text -> SchemaExtensionInfo)
-> Lens
SchemaExtensionInfo SchemaExtensionInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaExtensionInfo' {Maybe Text
description :: Maybe Text
$sel:description:SchemaExtensionInfo' :: SchemaExtensionInfo -> Maybe Text
description} -> Maybe Text
description) (\s :: SchemaExtensionInfo
s@SchemaExtensionInfo' {} Maybe Text
a -> SchemaExtensionInfo
s {$sel:description:SchemaExtensionInfo' :: Maybe Text
description = Maybe Text
a} :: SchemaExtensionInfo)
schemaExtensionInfo_endDateTime :: Lens.Lens' SchemaExtensionInfo (Prelude.Maybe Prelude.UTCTime)
schemaExtensionInfo_endDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SchemaExtensionInfo -> f SchemaExtensionInfo
schemaExtensionInfo_endDateTime = (SchemaExtensionInfo -> Maybe POSIX)
-> (SchemaExtensionInfo -> Maybe POSIX -> SchemaExtensionInfo)
-> Lens
SchemaExtensionInfo SchemaExtensionInfo (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaExtensionInfo' {Maybe POSIX
endDateTime :: Maybe POSIX
$sel:endDateTime:SchemaExtensionInfo' :: SchemaExtensionInfo -> Maybe POSIX
endDateTime} -> Maybe POSIX
endDateTime) (\s :: SchemaExtensionInfo
s@SchemaExtensionInfo' {} Maybe POSIX
a -> SchemaExtensionInfo
s {$sel:endDateTime:SchemaExtensionInfo' :: Maybe POSIX
endDateTime = Maybe POSIX
a} :: SchemaExtensionInfo) ((Maybe POSIX -> f (Maybe POSIX))
-> SchemaExtensionInfo -> f SchemaExtensionInfo)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SchemaExtensionInfo
-> f SchemaExtensionInfo
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
schemaExtensionInfo_startDateTime :: Lens.Lens' SchemaExtensionInfo (Prelude.Maybe Prelude.UTCTime)
schemaExtensionInfo_startDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SchemaExtensionInfo -> f SchemaExtensionInfo
schemaExtensionInfo_startDateTime = (SchemaExtensionInfo -> Maybe POSIX)
-> (SchemaExtensionInfo -> Maybe POSIX -> SchemaExtensionInfo)
-> Lens
SchemaExtensionInfo SchemaExtensionInfo (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SchemaExtensionInfo' {Maybe POSIX
startDateTime :: Maybe POSIX
$sel:startDateTime:SchemaExtensionInfo' :: SchemaExtensionInfo -> Maybe POSIX
startDateTime} -> Maybe POSIX
startDateTime) (\s :: SchemaExtensionInfo
s@SchemaExtensionInfo' {} Maybe POSIX
a -> SchemaExtensionInfo
s {$sel:startDateTime:SchemaExtensionInfo' :: Maybe POSIX
startDateTime = Maybe POSIX
a} :: SchemaExtensionInfo) ((Maybe POSIX -> f (Maybe POSIX))
-> SchemaExtensionInfo -> f SchemaExtensionInfo)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SchemaExtensionInfo
-> f SchemaExtensionInfo
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
instance Core.FromJSON SchemaExtensionInfo where
parseJSON :: Value -> Parser SchemaExtensionInfo
parseJSON =
String
-> (Object -> Parser SchemaExtensionInfo)
-> Value
-> Parser SchemaExtensionInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SchemaExtensionInfo"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SchemaExtensionStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> SchemaExtensionInfo
SchemaExtensionInfo'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SchemaExtensionStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> SchemaExtensionInfo)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe SchemaExtensionStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> SchemaExtensionInfo)
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
"DirectoryId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe SchemaExtensionStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> SchemaExtensionInfo)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe SchemaExtensionStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> SchemaExtensionInfo)
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
"SchemaExtensionId")
Parser
(Maybe Text
-> Maybe SchemaExtensionStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> SchemaExtensionInfo)
-> Parser (Maybe Text)
-> Parser
(Maybe SchemaExtensionStatus
-> Maybe Text -> Maybe POSIX -> Maybe POSIX -> SchemaExtensionInfo)
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
"SchemaExtensionStatusReason")
Parser
(Maybe SchemaExtensionStatus
-> Maybe Text -> Maybe POSIX -> Maybe POSIX -> SchemaExtensionInfo)
-> Parser (Maybe SchemaExtensionStatus)
-> Parser
(Maybe Text -> Maybe POSIX -> Maybe POSIX -> SchemaExtensionInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SchemaExtensionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SchemaExtensionStatus")
Parser
(Maybe Text -> Maybe POSIX -> Maybe POSIX -> SchemaExtensionInfo)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe POSIX -> SchemaExtensionInfo)
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
"Description")
Parser (Maybe POSIX -> Maybe POSIX -> SchemaExtensionInfo)
-> Parser (Maybe POSIX)
-> Parser (Maybe POSIX -> SchemaExtensionInfo)
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
"EndDateTime")
Parser (Maybe POSIX -> SchemaExtensionInfo)
-> Parser (Maybe POSIX) -> Parser SchemaExtensionInfo
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
"StartDateTime")
)
instance Prelude.Hashable SchemaExtensionInfo
instance Prelude.NFData SchemaExtensionInfo