{-# 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.ExportJobProperties where
import qualified Amazonka.Core as Core
import Amazonka.HealthLake.Types.JobStatus
import Amazonka.HealthLake.Types.OutputDataConfig
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ExportJobProperties = ExportJobProperties'
{
ExportJobProperties -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
ExportJobProperties -> Maybe POSIX
endTime :: Prelude.Maybe Core.POSIX,
ExportJobProperties -> Maybe Text
dataAccessRoleArn :: Prelude.Maybe Prelude.Text,
ExportJobProperties -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
ExportJobProperties -> Text
jobId :: Prelude.Text,
ExportJobProperties -> JobStatus
jobStatus :: JobStatus,
ExportJobProperties -> POSIX
submitTime :: Core.POSIX,
ExportJobProperties -> Text
datastoreId :: Prelude.Text,
ExportJobProperties -> OutputDataConfig
outputDataConfig :: OutputDataConfig
}
deriving (ExportJobProperties -> ExportJobProperties -> Bool
(ExportJobProperties -> ExportJobProperties -> Bool)
-> (ExportJobProperties -> ExportJobProperties -> Bool)
-> Eq ExportJobProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportJobProperties -> ExportJobProperties -> Bool
$c/= :: ExportJobProperties -> ExportJobProperties -> Bool
== :: ExportJobProperties -> ExportJobProperties -> Bool
$c== :: ExportJobProperties -> ExportJobProperties -> Bool
Prelude.Eq, ReadPrec [ExportJobProperties]
ReadPrec ExportJobProperties
Int -> ReadS ExportJobProperties
ReadS [ExportJobProperties]
(Int -> ReadS ExportJobProperties)
-> ReadS [ExportJobProperties]
-> ReadPrec ExportJobProperties
-> ReadPrec [ExportJobProperties]
-> Read ExportJobProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportJobProperties]
$creadListPrec :: ReadPrec [ExportJobProperties]
readPrec :: ReadPrec ExportJobProperties
$creadPrec :: ReadPrec ExportJobProperties
readList :: ReadS [ExportJobProperties]
$creadList :: ReadS [ExportJobProperties]
readsPrec :: Int -> ReadS ExportJobProperties
$creadsPrec :: Int -> ReadS ExportJobProperties
Prelude.Read, Int -> ExportJobProperties -> ShowS
[ExportJobProperties] -> ShowS
ExportJobProperties -> String
(Int -> ExportJobProperties -> ShowS)
-> (ExportJobProperties -> String)
-> ([ExportJobProperties] -> ShowS)
-> Show ExportJobProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportJobProperties] -> ShowS
$cshowList :: [ExportJobProperties] -> ShowS
show :: ExportJobProperties -> String
$cshow :: ExportJobProperties -> String
showsPrec :: Int -> ExportJobProperties -> ShowS
$cshowsPrec :: Int -> ExportJobProperties -> ShowS
Prelude.Show, (forall x. ExportJobProperties -> Rep ExportJobProperties x)
-> (forall x. Rep ExportJobProperties x -> ExportJobProperties)
-> Generic ExportJobProperties
forall x. Rep ExportJobProperties x -> ExportJobProperties
forall x. ExportJobProperties -> Rep ExportJobProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExportJobProperties x -> ExportJobProperties
$cfrom :: forall x. ExportJobProperties -> Rep ExportJobProperties x
Prelude.Generic)
newExportJobProperties ::
Prelude.Text ->
JobStatus ->
Prelude.UTCTime ->
Prelude.Text ->
OutputDataConfig ->
ExportJobProperties
newExportJobProperties :: Text
-> JobStatus
-> UTCTime
-> Text
-> OutputDataConfig
-> ExportJobProperties
newExportJobProperties
Text
pJobId_
JobStatus
pJobStatus_
UTCTime
pSubmitTime_
Text
pDatastoreId_
OutputDataConfig
pOutputDataConfig_ =
ExportJobProperties' :: Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Text
-> JobStatus
-> POSIX
-> Text
-> OutputDataConfig
-> ExportJobProperties
ExportJobProperties'
{ $sel:jobName:ExportJobProperties' :: Maybe Text
jobName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:endTime:ExportJobProperties' :: Maybe POSIX
endTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:dataAccessRoleArn:ExportJobProperties' :: Maybe Text
dataAccessRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:message:ExportJobProperties' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobId:ExportJobProperties' :: Text
jobId = Text
pJobId_,
$sel:jobStatus:ExportJobProperties' :: JobStatus
jobStatus = JobStatus
pJobStatus_,
$sel:submitTime:ExportJobProperties' :: POSIX
submitTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pSubmitTime_,
$sel:datastoreId:ExportJobProperties' :: Text
datastoreId = Text
pDatastoreId_,
$sel:outputDataConfig:ExportJobProperties' :: OutputDataConfig
outputDataConfig = OutputDataConfig
pOutputDataConfig_
}
exportJobProperties_jobName :: Lens.Lens' ExportJobProperties (Prelude.Maybe Prelude.Text)
exportJobProperties_jobName :: (Maybe Text -> f (Maybe Text))
-> ExportJobProperties -> f ExportJobProperties
exportJobProperties_jobName = (ExportJobProperties -> Maybe Text)
-> (ExportJobProperties -> Maybe Text -> ExportJobProperties)
-> Lens
ExportJobProperties ExportJobProperties (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportJobProperties' {Maybe Text
jobName :: Maybe Text
$sel:jobName:ExportJobProperties' :: ExportJobProperties -> Maybe Text
jobName} -> Maybe Text
jobName) (\s :: ExportJobProperties
s@ExportJobProperties' {} Maybe Text
a -> ExportJobProperties
s {$sel:jobName:ExportJobProperties' :: Maybe Text
jobName = Maybe Text
a} :: ExportJobProperties)
exportJobProperties_endTime :: Lens.Lens' ExportJobProperties (Prelude.Maybe Prelude.UTCTime)
exportJobProperties_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ExportJobProperties -> f ExportJobProperties
exportJobProperties_endTime = (ExportJobProperties -> Maybe POSIX)
-> (ExportJobProperties -> Maybe POSIX -> ExportJobProperties)
-> Lens
ExportJobProperties ExportJobProperties (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportJobProperties' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:ExportJobProperties' :: ExportJobProperties -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: ExportJobProperties
s@ExportJobProperties' {} Maybe POSIX
a -> ExportJobProperties
s {$sel:endTime:ExportJobProperties' :: Maybe POSIX
endTime = Maybe POSIX
a} :: ExportJobProperties) ((Maybe POSIX -> f (Maybe POSIX))
-> ExportJobProperties -> f ExportJobProperties)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ExportJobProperties
-> f ExportJobProperties
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
exportJobProperties_dataAccessRoleArn :: Lens.Lens' ExportJobProperties (Prelude.Maybe Prelude.Text)
exportJobProperties_dataAccessRoleArn :: (Maybe Text -> f (Maybe Text))
-> ExportJobProperties -> f ExportJobProperties
exportJobProperties_dataAccessRoleArn = (ExportJobProperties -> Maybe Text)
-> (ExportJobProperties -> Maybe Text -> ExportJobProperties)
-> Lens
ExportJobProperties ExportJobProperties (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportJobProperties' {Maybe Text
dataAccessRoleArn :: Maybe Text
$sel:dataAccessRoleArn:ExportJobProperties' :: ExportJobProperties -> Maybe Text
dataAccessRoleArn} -> Maybe Text
dataAccessRoleArn) (\s :: ExportJobProperties
s@ExportJobProperties' {} Maybe Text
a -> ExportJobProperties
s {$sel:dataAccessRoleArn:ExportJobProperties' :: Maybe Text
dataAccessRoleArn = Maybe Text
a} :: ExportJobProperties)
exportJobProperties_message :: Lens.Lens' ExportJobProperties (Prelude.Maybe Prelude.Text)
exportJobProperties_message :: (Maybe Text -> f (Maybe Text))
-> ExportJobProperties -> f ExportJobProperties
exportJobProperties_message = (ExportJobProperties -> Maybe Text)
-> (ExportJobProperties -> Maybe Text -> ExportJobProperties)
-> Lens
ExportJobProperties ExportJobProperties (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportJobProperties' {Maybe Text
message :: Maybe Text
$sel:message:ExportJobProperties' :: ExportJobProperties -> Maybe Text
message} -> Maybe Text
message) (\s :: ExportJobProperties
s@ExportJobProperties' {} Maybe Text
a -> ExportJobProperties
s {$sel:message:ExportJobProperties' :: Maybe Text
message = Maybe Text
a} :: ExportJobProperties)
exportJobProperties_jobId :: Lens.Lens' ExportJobProperties Prelude.Text
exportJobProperties_jobId :: (Text -> f Text) -> ExportJobProperties -> f ExportJobProperties
exportJobProperties_jobId = (ExportJobProperties -> Text)
-> (ExportJobProperties -> Text -> ExportJobProperties)
-> Lens ExportJobProperties ExportJobProperties Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportJobProperties' {Text
jobId :: Text
$sel:jobId:ExportJobProperties' :: ExportJobProperties -> Text
jobId} -> Text
jobId) (\s :: ExportJobProperties
s@ExportJobProperties' {} Text
a -> ExportJobProperties
s {$sel:jobId:ExportJobProperties' :: Text
jobId = Text
a} :: ExportJobProperties)
exportJobProperties_jobStatus :: Lens.Lens' ExportJobProperties JobStatus
exportJobProperties_jobStatus :: (JobStatus -> f JobStatus)
-> ExportJobProperties -> f ExportJobProperties
exportJobProperties_jobStatus = (ExportJobProperties -> JobStatus)
-> (ExportJobProperties -> JobStatus -> ExportJobProperties)
-> Lens ExportJobProperties ExportJobProperties JobStatus JobStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportJobProperties' {JobStatus
jobStatus :: JobStatus
$sel:jobStatus:ExportJobProperties' :: ExportJobProperties -> JobStatus
jobStatus} -> JobStatus
jobStatus) (\s :: ExportJobProperties
s@ExportJobProperties' {} JobStatus
a -> ExportJobProperties
s {$sel:jobStatus:ExportJobProperties' :: JobStatus
jobStatus = JobStatus
a} :: ExportJobProperties)
exportJobProperties_submitTime :: Lens.Lens' ExportJobProperties Prelude.UTCTime
exportJobProperties_submitTime :: (UTCTime -> f UTCTime)
-> ExportJobProperties -> f ExportJobProperties
exportJobProperties_submitTime = (ExportJobProperties -> POSIX)
-> (ExportJobProperties -> POSIX -> ExportJobProperties)
-> Lens ExportJobProperties ExportJobProperties POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportJobProperties' {POSIX
submitTime :: POSIX
$sel:submitTime:ExportJobProperties' :: ExportJobProperties -> POSIX
submitTime} -> POSIX
submitTime) (\s :: ExportJobProperties
s@ExportJobProperties' {} POSIX
a -> ExportJobProperties
s {$sel:submitTime:ExportJobProperties' :: POSIX
submitTime = POSIX
a} :: ExportJobProperties) ((POSIX -> f POSIX)
-> ExportJobProperties -> f ExportJobProperties)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ExportJobProperties
-> f ExportJobProperties
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
exportJobProperties_datastoreId :: Lens.Lens' ExportJobProperties Prelude.Text
exportJobProperties_datastoreId :: (Text -> f Text) -> ExportJobProperties -> f ExportJobProperties
exportJobProperties_datastoreId = (ExportJobProperties -> Text)
-> (ExportJobProperties -> Text -> ExportJobProperties)
-> Lens ExportJobProperties ExportJobProperties Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportJobProperties' {Text
datastoreId :: Text
$sel:datastoreId:ExportJobProperties' :: ExportJobProperties -> Text
datastoreId} -> Text
datastoreId) (\s :: ExportJobProperties
s@ExportJobProperties' {} Text
a -> ExportJobProperties
s {$sel:datastoreId:ExportJobProperties' :: Text
datastoreId = Text
a} :: ExportJobProperties)
exportJobProperties_outputDataConfig :: Lens.Lens' ExportJobProperties OutputDataConfig
exportJobProperties_outputDataConfig :: (OutputDataConfig -> f OutputDataConfig)
-> ExportJobProperties -> f ExportJobProperties
exportJobProperties_outputDataConfig = (ExportJobProperties -> OutputDataConfig)
-> (ExportJobProperties -> OutputDataConfig -> ExportJobProperties)
-> Lens
ExportJobProperties
ExportJobProperties
OutputDataConfig
OutputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportJobProperties' {OutputDataConfig
outputDataConfig :: OutputDataConfig
$sel:outputDataConfig:ExportJobProperties' :: ExportJobProperties -> OutputDataConfig
outputDataConfig} -> OutputDataConfig
outputDataConfig) (\s :: ExportJobProperties
s@ExportJobProperties' {} OutputDataConfig
a -> ExportJobProperties
s {$sel:outputDataConfig:ExportJobProperties' :: OutputDataConfig
outputDataConfig = OutputDataConfig
a} :: ExportJobProperties)
instance Core.FromJSON ExportJobProperties where
parseJSON :: Value -> Parser ExportJobProperties
parseJSON =
String
-> (Object -> Parser ExportJobProperties)
-> Value
-> Parser ExportJobProperties
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ExportJobProperties"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Text
-> JobStatus
-> POSIX
-> Text
-> OutputDataConfig
-> ExportJobProperties
ExportJobProperties'
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Text
-> JobStatus
-> POSIX
-> Text
-> OutputDataConfig
-> ExportJobProperties)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Text
-> JobStatus
-> POSIX
-> Text
-> OutputDataConfig
-> ExportJobProperties)
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
"JobName")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Text
-> JobStatus
-> POSIX
-> Text
-> OutputDataConfig
-> ExportJobProperties)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Text
-> JobStatus
-> POSIX
-> Text
-> OutputDataConfig
-> ExportJobProperties)
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
"EndTime")
Parser
(Maybe Text
-> Maybe Text
-> Text
-> JobStatus
-> POSIX
-> Text
-> OutputDataConfig
-> ExportJobProperties)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Text
-> JobStatus
-> POSIX
-> Text
-> OutputDataConfig
-> ExportJobProperties)
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
"DataAccessRoleArn")
Parser
(Maybe Text
-> Text
-> JobStatus
-> POSIX
-> Text
-> OutputDataConfig
-> ExportJobProperties)
-> Parser (Maybe Text)
-> Parser
(Text
-> JobStatus
-> POSIX
-> Text
-> OutputDataConfig
-> ExportJobProperties)
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
"Message")
Parser
(Text
-> JobStatus
-> POSIX
-> Text
-> OutputDataConfig
-> ExportJobProperties)
-> Parser Text
-> Parser
(JobStatus
-> POSIX -> Text -> OutputDataConfig -> ExportJobProperties)
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
"JobId")
Parser
(JobStatus
-> POSIX -> Text -> OutputDataConfig -> ExportJobProperties)
-> Parser JobStatus
-> Parser
(POSIX -> Text -> OutputDataConfig -> ExportJobProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser JobStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"JobStatus")
Parser (POSIX -> Text -> OutputDataConfig -> ExportJobProperties)
-> Parser POSIX
-> Parser (Text -> OutputDataConfig -> ExportJobProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"SubmitTime")
Parser (Text -> OutputDataConfig -> ExportJobProperties)
-> Parser Text -> Parser (OutputDataConfig -> ExportJobProperties)
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 (OutputDataConfig -> ExportJobProperties)
-> Parser OutputDataConfig -> Parser ExportJobProperties
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser OutputDataConfig
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"OutputDataConfig")
)
instance Prelude.Hashable ExportJobProperties
instance Prelude.NFData ExportJobProperties