{-# 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.HealthLake.Types.DatastoreProperties where
import qualified Amazonka.Core as Core
import Amazonka.HealthLake.Types.DatastoreStatus
import Amazonka.HealthLake.Types.FHIRVersion
import Amazonka.HealthLake.Types.PreloadDataConfig
import Amazonka.HealthLake.Types.SseConfiguration
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DatastoreProperties = DatastoreProperties'
{
DatastoreProperties -> Maybe SseConfiguration
sseConfiguration :: Prelude.Maybe SseConfiguration,
DatastoreProperties -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
DatastoreProperties -> Maybe Text
datastoreName :: Prelude.Maybe Prelude.Text,
DatastoreProperties -> Maybe PreloadDataConfig
preloadDataConfig :: Prelude.Maybe PreloadDataConfig,
DatastoreProperties -> Text
datastoreId :: Prelude.Text,
DatastoreProperties -> Text
datastoreArn :: Prelude.Text,
DatastoreProperties -> DatastoreStatus
datastoreStatus :: DatastoreStatus,
DatastoreProperties -> FHIRVersion
datastoreTypeVersion :: FHIRVersion,
DatastoreProperties -> Text
datastoreEndpoint :: Prelude.Text
}
deriving (DatastoreProperties -> DatastoreProperties -> Bool
(DatastoreProperties -> DatastoreProperties -> Bool)
-> (DatastoreProperties -> DatastoreProperties -> Bool)
-> Eq DatastoreProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DatastoreProperties -> DatastoreProperties -> Bool
$c/= :: DatastoreProperties -> DatastoreProperties -> Bool
== :: DatastoreProperties -> DatastoreProperties -> Bool
$c== :: DatastoreProperties -> DatastoreProperties -> Bool
Prelude.Eq, ReadPrec [DatastoreProperties]
ReadPrec DatastoreProperties
Int -> ReadS DatastoreProperties
ReadS [DatastoreProperties]
(Int -> ReadS DatastoreProperties)
-> ReadS [DatastoreProperties]
-> ReadPrec DatastoreProperties
-> ReadPrec [DatastoreProperties]
-> Read DatastoreProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DatastoreProperties]
$creadListPrec :: ReadPrec [DatastoreProperties]
readPrec :: ReadPrec DatastoreProperties
$creadPrec :: ReadPrec DatastoreProperties
readList :: ReadS [DatastoreProperties]
$creadList :: ReadS [DatastoreProperties]
readsPrec :: Int -> ReadS DatastoreProperties
$creadsPrec :: Int -> ReadS DatastoreProperties
Prelude.Read, Int -> DatastoreProperties -> ShowS
[DatastoreProperties] -> ShowS
DatastoreProperties -> String
(Int -> DatastoreProperties -> ShowS)
-> (DatastoreProperties -> String)
-> ([DatastoreProperties] -> ShowS)
-> Show DatastoreProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DatastoreProperties] -> ShowS
$cshowList :: [DatastoreProperties] -> ShowS
show :: DatastoreProperties -> String
$cshow :: DatastoreProperties -> String
showsPrec :: Int -> DatastoreProperties -> ShowS
$cshowsPrec :: Int -> DatastoreProperties -> ShowS
Prelude.Show, (forall x. DatastoreProperties -> Rep DatastoreProperties x)
-> (forall x. Rep DatastoreProperties x -> DatastoreProperties)
-> Generic DatastoreProperties
forall x. Rep DatastoreProperties x -> DatastoreProperties
forall x. DatastoreProperties -> Rep DatastoreProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DatastoreProperties x -> DatastoreProperties
$cfrom :: forall x. DatastoreProperties -> Rep DatastoreProperties x
Prelude.Generic)
newDatastoreProperties ::
Prelude.Text ->
Prelude.Text ->
DatastoreStatus ->
FHIRVersion ->
Prelude.Text ->
DatastoreProperties
newDatastoreProperties :: Text
-> Text
-> DatastoreStatus
-> FHIRVersion
-> Text
-> DatastoreProperties
newDatastoreProperties
Text
pDatastoreId_
Text
pDatastoreArn_
DatastoreStatus
pDatastoreStatus_
FHIRVersion
pDatastoreTypeVersion_
Text
pDatastoreEndpoint_ =
DatastoreProperties' :: Maybe SseConfiguration
-> Maybe POSIX
-> Maybe Text
-> Maybe PreloadDataConfig
-> Text
-> Text
-> DatastoreStatus
-> FHIRVersion
-> Text
-> DatastoreProperties
DatastoreProperties'
{ $sel:sseConfiguration:DatastoreProperties' :: Maybe SseConfiguration
sseConfiguration =
Maybe SseConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:DatastoreProperties' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:datastoreName:DatastoreProperties' :: Maybe Text
datastoreName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:preloadDataConfig:DatastoreProperties' :: Maybe PreloadDataConfig
preloadDataConfig = Maybe PreloadDataConfig
forall a. Maybe a
Prelude.Nothing,
$sel:datastoreId:DatastoreProperties' :: Text
datastoreId = Text
pDatastoreId_,
$sel:datastoreArn:DatastoreProperties' :: Text
datastoreArn = Text
pDatastoreArn_,
$sel:datastoreStatus:DatastoreProperties' :: DatastoreStatus
datastoreStatus = DatastoreStatus
pDatastoreStatus_,
$sel:datastoreTypeVersion:DatastoreProperties' :: FHIRVersion
datastoreTypeVersion = FHIRVersion
pDatastoreTypeVersion_,
$sel:datastoreEndpoint:DatastoreProperties' :: Text
datastoreEndpoint = Text
pDatastoreEndpoint_
}
datastoreProperties_sseConfiguration :: Lens.Lens' DatastoreProperties (Prelude.Maybe SseConfiguration)
datastoreProperties_sseConfiguration :: (Maybe SseConfiguration -> f (Maybe SseConfiguration))
-> DatastoreProperties -> f DatastoreProperties
datastoreProperties_sseConfiguration = (DatastoreProperties -> Maybe SseConfiguration)
-> (DatastoreProperties
-> Maybe SseConfiguration -> DatastoreProperties)
-> Lens
DatastoreProperties
DatastoreProperties
(Maybe SseConfiguration)
(Maybe SseConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatastoreProperties' {Maybe SseConfiguration
sseConfiguration :: Maybe SseConfiguration
$sel:sseConfiguration:DatastoreProperties' :: DatastoreProperties -> Maybe SseConfiguration
sseConfiguration} -> Maybe SseConfiguration
sseConfiguration) (\s :: DatastoreProperties
s@DatastoreProperties' {} Maybe SseConfiguration
a -> DatastoreProperties
s {$sel:sseConfiguration:DatastoreProperties' :: Maybe SseConfiguration
sseConfiguration = Maybe SseConfiguration
a} :: DatastoreProperties)
datastoreProperties_createdAt :: Lens.Lens' DatastoreProperties (Prelude.Maybe Prelude.UTCTime)
datastoreProperties_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DatastoreProperties -> f DatastoreProperties
datastoreProperties_createdAt = (DatastoreProperties -> Maybe POSIX)
-> (DatastoreProperties -> Maybe POSIX -> DatastoreProperties)
-> Lens
DatastoreProperties DatastoreProperties (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatastoreProperties' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:DatastoreProperties' :: DatastoreProperties -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: DatastoreProperties
s@DatastoreProperties' {} Maybe POSIX
a -> DatastoreProperties
s {$sel:createdAt:DatastoreProperties' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: DatastoreProperties) ((Maybe POSIX -> f (Maybe POSIX))
-> DatastoreProperties -> f DatastoreProperties)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DatastoreProperties
-> f DatastoreProperties
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
datastoreProperties_datastoreName :: Lens.Lens' DatastoreProperties (Prelude.Maybe Prelude.Text)
datastoreProperties_datastoreName :: (Maybe Text -> f (Maybe Text))
-> DatastoreProperties -> f DatastoreProperties
datastoreProperties_datastoreName = (DatastoreProperties -> Maybe Text)
-> (DatastoreProperties -> Maybe Text -> DatastoreProperties)
-> Lens
DatastoreProperties DatastoreProperties (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatastoreProperties' {Maybe Text
datastoreName :: Maybe Text
$sel:datastoreName:DatastoreProperties' :: DatastoreProperties -> Maybe Text
datastoreName} -> Maybe Text
datastoreName) (\s :: DatastoreProperties
s@DatastoreProperties' {} Maybe Text
a -> DatastoreProperties
s {$sel:datastoreName:DatastoreProperties' :: Maybe Text
datastoreName = Maybe Text
a} :: DatastoreProperties)
datastoreProperties_preloadDataConfig :: Lens.Lens' DatastoreProperties (Prelude.Maybe PreloadDataConfig)
datastoreProperties_preloadDataConfig :: (Maybe PreloadDataConfig -> f (Maybe PreloadDataConfig))
-> DatastoreProperties -> f DatastoreProperties
datastoreProperties_preloadDataConfig = (DatastoreProperties -> Maybe PreloadDataConfig)
-> (DatastoreProperties
-> Maybe PreloadDataConfig -> DatastoreProperties)
-> Lens
DatastoreProperties
DatastoreProperties
(Maybe PreloadDataConfig)
(Maybe PreloadDataConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatastoreProperties' {Maybe PreloadDataConfig
preloadDataConfig :: Maybe PreloadDataConfig
$sel:preloadDataConfig:DatastoreProperties' :: DatastoreProperties -> Maybe PreloadDataConfig
preloadDataConfig} -> Maybe PreloadDataConfig
preloadDataConfig) (\s :: DatastoreProperties
s@DatastoreProperties' {} Maybe PreloadDataConfig
a -> DatastoreProperties
s {$sel:preloadDataConfig:DatastoreProperties' :: Maybe PreloadDataConfig
preloadDataConfig = Maybe PreloadDataConfig
a} :: DatastoreProperties)
datastoreProperties_datastoreId :: Lens.Lens' DatastoreProperties Prelude.Text
datastoreProperties_datastoreId :: (Text -> f Text) -> DatastoreProperties -> f DatastoreProperties
datastoreProperties_datastoreId = (DatastoreProperties -> Text)
-> (DatastoreProperties -> Text -> DatastoreProperties)
-> Lens DatastoreProperties DatastoreProperties Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatastoreProperties' {Text
datastoreId :: Text
$sel:datastoreId:DatastoreProperties' :: DatastoreProperties -> Text
datastoreId} -> Text
datastoreId) (\s :: DatastoreProperties
s@DatastoreProperties' {} Text
a -> DatastoreProperties
s {$sel:datastoreId:DatastoreProperties' :: Text
datastoreId = Text
a} :: DatastoreProperties)
datastoreProperties_datastoreArn :: Lens.Lens' DatastoreProperties Prelude.Text
datastoreProperties_datastoreArn :: (Text -> f Text) -> DatastoreProperties -> f DatastoreProperties
datastoreProperties_datastoreArn = (DatastoreProperties -> Text)
-> (DatastoreProperties -> Text -> DatastoreProperties)
-> Lens DatastoreProperties DatastoreProperties Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatastoreProperties' {Text
datastoreArn :: Text
$sel:datastoreArn:DatastoreProperties' :: DatastoreProperties -> Text
datastoreArn} -> Text
datastoreArn) (\s :: DatastoreProperties
s@DatastoreProperties' {} Text
a -> DatastoreProperties
s {$sel:datastoreArn:DatastoreProperties' :: Text
datastoreArn = Text
a} :: DatastoreProperties)
datastoreProperties_datastoreStatus :: Lens.Lens' DatastoreProperties DatastoreStatus
datastoreProperties_datastoreStatus :: (DatastoreStatus -> f DatastoreStatus)
-> DatastoreProperties -> f DatastoreProperties
datastoreProperties_datastoreStatus = (DatastoreProperties -> DatastoreStatus)
-> (DatastoreProperties -> DatastoreStatus -> DatastoreProperties)
-> Lens
DatastoreProperties
DatastoreProperties
DatastoreStatus
DatastoreStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatastoreProperties' {DatastoreStatus
datastoreStatus :: DatastoreStatus
$sel:datastoreStatus:DatastoreProperties' :: DatastoreProperties -> DatastoreStatus
datastoreStatus} -> DatastoreStatus
datastoreStatus) (\s :: DatastoreProperties
s@DatastoreProperties' {} DatastoreStatus
a -> DatastoreProperties
s {$sel:datastoreStatus:DatastoreProperties' :: DatastoreStatus
datastoreStatus = DatastoreStatus
a} :: DatastoreProperties)
datastoreProperties_datastoreTypeVersion :: Lens.Lens' DatastoreProperties FHIRVersion
datastoreProperties_datastoreTypeVersion :: (FHIRVersion -> f FHIRVersion)
-> DatastoreProperties -> f DatastoreProperties
datastoreProperties_datastoreTypeVersion = (DatastoreProperties -> FHIRVersion)
-> (DatastoreProperties -> FHIRVersion -> DatastoreProperties)
-> Lens
DatastoreProperties DatastoreProperties FHIRVersion FHIRVersion
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatastoreProperties' {FHIRVersion
datastoreTypeVersion :: FHIRVersion
$sel:datastoreTypeVersion:DatastoreProperties' :: DatastoreProperties -> FHIRVersion
datastoreTypeVersion} -> FHIRVersion
datastoreTypeVersion) (\s :: DatastoreProperties
s@DatastoreProperties' {} FHIRVersion
a -> DatastoreProperties
s {$sel:datastoreTypeVersion:DatastoreProperties' :: FHIRVersion
datastoreTypeVersion = FHIRVersion
a} :: DatastoreProperties)
datastoreProperties_datastoreEndpoint :: Lens.Lens' DatastoreProperties Prelude.Text
datastoreProperties_datastoreEndpoint :: (Text -> f Text) -> DatastoreProperties -> f DatastoreProperties
datastoreProperties_datastoreEndpoint = (DatastoreProperties -> Text)
-> (DatastoreProperties -> Text -> DatastoreProperties)
-> Lens DatastoreProperties DatastoreProperties Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatastoreProperties' {Text
datastoreEndpoint :: Text
$sel:datastoreEndpoint:DatastoreProperties' :: DatastoreProperties -> Text
datastoreEndpoint} -> Text
datastoreEndpoint) (\s :: DatastoreProperties
s@DatastoreProperties' {} Text
a -> DatastoreProperties
s {$sel:datastoreEndpoint:DatastoreProperties' :: Text
datastoreEndpoint = Text
a} :: DatastoreProperties)
instance Core.FromJSON DatastoreProperties where
parseJSON :: Value -> Parser DatastoreProperties
parseJSON =
String
-> (Object -> Parser DatastoreProperties)
-> Value
-> Parser DatastoreProperties
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DatastoreProperties"
( \Object
x ->
Maybe SseConfiguration
-> Maybe POSIX
-> Maybe Text
-> Maybe PreloadDataConfig
-> Text
-> Text
-> DatastoreStatus
-> FHIRVersion
-> Text
-> DatastoreProperties
DatastoreProperties'
(Maybe SseConfiguration
-> Maybe POSIX
-> Maybe Text
-> Maybe PreloadDataConfig
-> Text
-> Text
-> DatastoreStatus
-> FHIRVersion
-> Text
-> DatastoreProperties)
-> Parser (Maybe SseConfiguration)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe PreloadDataConfig
-> Text
-> Text
-> DatastoreStatus
-> FHIRVersion
-> Text
-> DatastoreProperties)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe SseConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SseConfiguration")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe PreloadDataConfig
-> Text
-> Text
-> DatastoreStatus
-> FHIRVersion
-> Text
-> DatastoreProperties)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe PreloadDataConfig
-> Text
-> Text
-> DatastoreStatus
-> FHIRVersion
-> Text
-> DatastoreProperties)
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
"CreatedAt")
Parser
(Maybe Text
-> Maybe PreloadDataConfig
-> Text
-> Text
-> DatastoreStatus
-> FHIRVersion
-> Text
-> DatastoreProperties)
-> Parser (Maybe Text)
-> Parser
(Maybe PreloadDataConfig
-> Text
-> Text
-> DatastoreStatus
-> FHIRVersion
-> Text
-> DatastoreProperties)
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
"DatastoreName")
Parser
(Maybe PreloadDataConfig
-> Text
-> Text
-> DatastoreStatus
-> FHIRVersion
-> Text
-> DatastoreProperties)
-> Parser (Maybe PreloadDataConfig)
-> Parser
(Text
-> Text
-> DatastoreStatus
-> FHIRVersion
-> Text
-> DatastoreProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PreloadDataConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PreloadDataConfig")
Parser
(Text
-> Text
-> DatastoreStatus
-> FHIRVersion
-> Text
-> DatastoreProperties)
-> Parser Text
-> Parser
(Text
-> DatastoreStatus -> FHIRVersion -> Text -> DatastoreProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"DatastoreId")
Parser
(Text
-> DatastoreStatus -> FHIRVersion -> Text -> DatastoreProperties)
-> Parser Text
-> Parser
(DatastoreStatus -> FHIRVersion -> Text -> DatastoreProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"DatastoreArn")
Parser
(DatastoreStatus -> FHIRVersion -> Text -> DatastoreProperties)
-> Parser DatastoreStatus
-> Parser (FHIRVersion -> Text -> DatastoreProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser DatastoreStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"DatastoreStatus")
Parser (FHIRVersion -> Text -> DatastoreProperties)
-> Parser FHIRVersion -> Parser (Text -> DatastoreProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser FHIRVersion
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"DatastoreTypeVersion")
Parser (Text -> DatastoreProperties)
-> Parser Text -> Parser DatastoreProperties
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"DatastoreEndpoint")
)
instance Prelude.Hashable DatastoreProperties
instance Prelude.NFData DatastoreProperties