{-# 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.QLDB.Types.JournalS3ExportDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QLDB.Types.ExportStatus
import Amazonka.QLDB.Types.S3ExportConfiguration
data JournalS3ExportDescription = JournalS3ExportDescription'
{
JournalS3ExportDescription -> Text
ledgerName :: Prelude.Text,
JournalS3ExportDescription -> Text
exportId :: Prelude.Text,
JournalS3ExportDescription -> POSIX
exportCreationTime :: Core.POSIX,
JournalS3ExportDescription -> ExportStatus
status :: ExportStatus,
JournalS3ExportDescription -> POSIX
inclusiveStartTime :: Core.POSIX,
JournalS3ExportDescription -> POSIX
exclusiveEndTime :: Core.POSIX,
JournalS3ExportDescription -> S3ExportConfiguration
s3ExportConfiguration :: S3ExportConfiguration,
JournalS3ExportDescription -> Text
roleArn :: Prelude.Text
}
deriving (JournalS3ExportDescription -> JournalS3ExportDescription -> Bool
(JournalS3ExportDescription -> JournalS3ExportDescription -> Bool)
-> (JournalS3ExportDescription
-> JournalS3ExportDescription -> Bool)
-> Eq JournalS3ExportDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JournalS3ExportDescription -> JournalS3ExportDescription -> Bool
$c/= :: JournalS3ExportDescription -> JournalS3ExportDescription -> Bool
== :: JournalS3ExportDescription -> JournalS3ExportDescription -> Bool
$c== :: JournalS3ExportDescription -> JournalS3ExportDescription -> Bool
Prelude.Eq, ReadPrec [JournalS3ExportDescription]
ReadPrec JournalS3ExportDescription
Int -> ReadS JournalS3ExportDescription
ReadS [JournalS3ExportDescription]
(Int -> ReadS JournalS3ExportDescription)
-> ReadS [JournalS3ExportDescription]
-> ReadPrec JournalS3ExportDescription
-> ReadPrec [JournalS3ExportDescription]
-> Read JournalS3ExportDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JournalS3ExportDescription]
$creadListPrec :: ReadPrec [JournalS3ExportDescription]
readPrec :: ReadPrec JournalS3ExportDescription
$creadPrec :: ReadPrec JournalS3ExportDescription
readList :: ReadS [JournalS3ExportDescription]
$creadList :: ReadS [JournalS3ExportDescription]
readsPrec :: Int -> ReadS JournalS3ExportDescription
$creadsPrec :: Int -> ReadS JournalS3ExportDescription
Prelude.Read, Int -> JournalS3ExportDescription -> ShowS
[JournalS3ExportDescription] -> ShowS
JournalS3ExportDescription -> String
(Int -> JournalS3ExportDescription -> ShowS)
-> (JournalS3ExportDescription -> String)
-> ([JournalS3ExportDescription] -> ShowS)
-> Show JournalS3ExportDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JournalS3ExportDescription] -> ShowS
$cshowList :: [JournalS3ExportDescription] -> ShowS
show :: JournalS3ExportDescription -> String
$cshow :: JournalS3ExportDescription -> String
showsPrec :: Int -> JournalS3ExportDescription -> ShowS
$cshowsPrec :: Int -> JournalS3ExportDescription -> ShowS
Prelude.Show, (forall x.
JournalS3ExportDescription -> Rep JournalS3ExportDescription x)
-> (forall x.
Rep JournalS3ExportDescription x -> JournalS3ExportDescription)
-> Generic JournalS3ExportDescription
forall x.
Rep JournalS3ExportDescription x -> JournalS3ExportDescription
forall x.
JournalS3ExportDescription -> Rep JournalS3ExportDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep JournalS3ExportDescription x -> JournalS3ExportDescription
$cfrom :: forall x.
JournalS3ExportDescription -> Rep JournalS3ExportDescription x
Prelude.Generic)
newJournalS3ExportDescription ::
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
ExportStatus ->
Prelude.UTCTime ->
Prelude.UTCTime ->
S3ExportConfiguration ->
Prelude.Text ->
JournalS3ExportDescription
newJournalS3ExportDescription :: Text
-> Text
-> UTCTime
-> ExportStatus
-> UTCTime
-> UTCTime
-> S3ExportConfiguration
-> Text
-> JournalS3ExportDescription
newJournalS3ExportDescription
Text
pLedgerName_
Text
pExportId_
UTCTime
pExportCreationTime_
ExportStatus
pStatus_
UTCTime
pInclusiveStartTime_
UTCTime
pExclusiveEndTime_
S3ExportConfiguration
pS3ExportConfiguration_
Text
pRoleArn_ =
JournalS3ExportDescription' :: Text
-> Text
-> POSIX
-> ExportStatus
-> POSIX
-> POSIX
-> S3ExportConfiguration
-> Text
-> JournalS3ExportDescription
JournalS3ExportDescription'
{ $sel:ledgerName:JournalS3ExportDescription' :: Text
ledgerName =
Text
pLedgerName_,
$sel:exportId:JournalS3ExportDescription' :: Text
exportId = Text
pExportId_,
$sel:exportCreationTime:JournalS3ExportDescription' :: POSIX
exportCreationTime =
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
pExportCreationTime_,
$sel:status:JournalS3ExportDescription' :: ExportStatus
status = ExportStatus
pStatus_,
$sel:inclusiveStartTime:JournalS3ExportDescription' :: POSIX
inclusiveStartTime =
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
pInclusiveStartTime_,
$sel:exclusiveEndTime:JournalS3ExportDescription' :: POSIX
exclusiveEndTime =
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
pExclusiveEndTime_,
$sel:s3ExportConfiguration:JournalS3ExportDescription' :: S3ExportConfiguration
s3ExportConfiguration = S3ExportConfiguration
pS3ExportConfiguration_,
$sel:roleArn:JournalS3ExportDescription' :: Text
roleArn = Text
pRoleArn_
}
journalS3ExportDescription_ledgerName :: Lens.Lens' JournalS3ExportDescription Prelude.Text
journalS3ExportDescription_ledgerName :: (Text -> f Text)
-> JournalS3ExportDescription -> f JournalS3ExportDescription
journalS3ExportDescription_ledgerName = (JournalS3ExportDescription -> Text)
-> (JournalS3ExportDescription
-> Text -> JournalS3ExportDescription)
-> Lens
JournalS3ExportDescription JournalS3ExportDescription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JournalS3ExportDescription' {Text
ledgerName :: Text
$sel:ledgerName:JournalS3ExportDescription' :: JournalS3ExportDescription -> Text
ledgerName} -> Text
ledgerName) (\s :: JournalS3ExportDescription
s@JournalS3ExportDescription' {} Text
a -> JournalS3ExportDescription
s {$sel:ledgerName:JournalS3ExportDescription' :: Text
ledgerName = Text
a} :: JournalS3ExportDescription)
journalS3ExportDescription_exportId :: Lens.Lens' JournalS3ExportDescription Prelude.Text
journalS3ExportDescription_exportId :: (Text -> f Text)
-> JournalS3ExportDescription -> f JournalS3ExportDescription
journalS3ExportDescription_exportId = (JournalS3ExportDescription -> Text)
-> (JournalS3ExportDescription
-> Text -> JournalS3ExportDescription)
-> Lens
JournalS3ExportDescription JournalS3ExportDescription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JournalS3ExportDescription' {Text
exportId :: Text
$sel:exportId:JournalS3ExportDescription' :: JournalS3ExportDescription -> Text
exportId} -> Text
exportId) (\s :: JournalS3ExportDescription
s@JournalS3ExportDescription' {} Text
a -> JournalS3ExportDescription
s {$sel:exportId:JournalS3ExportDescription' :: Text
exportId = Text
a} :: JournalS3ExportDescription)
journalS3ExportDescription_exportCreationTime :: Lens.Lens' JournalS3ExportDescription Prelude.UTCTime
journalS3ExportDescription_exportCreationTime :: (UTCTime -> f UTCTime)
-> JournalS3ExportDescription -> f JournalS3ExportDescription
journalS3ExportDescription_exportCreationTime = (JournalS3ExportDescription -> POSIX)
-> (JournalS3ExportDescription
-> POSIX -> JournalS3ExportDescription)
-> Lens
JournalS3ExportDescription JournalS3ExportDescription POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JournalS3ExportDescription' {POSIX
exportCreationTime :: POSIX
$sel:exportCreationTime:JournalS3ExportDescription' :: JournalS3ExportDescription -> POSIX
exportCreationTime} -> POSIX
exportCreationTime) (\s :: JournalS3ExportDescription
s@JournalS3ExportDescription' {} POSIX
a -> JournalS3ExportDescription
s {$sel:exportCreationTime:JournalS3ExportDescription' :: POSIX
exportCreationTime = POSIX
a} :: JournalS3ExportDescription) ((POSIX -> f POSIX)
-> JournalS3ExportDescription -> f JournalS3ExportDescription)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> JournalS3ExportDescription
-> f JournalS3ExportDescription
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
journalS3ExportDescription_status :: Lens.Lens' JournalS3ExportDescription ExportStatus
journalS3ExportDescription_status :: (ExportStatus -> f ExportStatus)
-> JournalS3ExportDescription -> f JournalS3ExportDescription
journalS3ExportDescription_status = (JournalS3ExportDescription -> ExportStatus)
-> (JournalS3ExportDescription
-> ExportStatus -> JournalS3ExportDescription)
-> Lens
JournalS3ExportDescription
JournalS3ExportDescription
ExportStatus
ExportStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JournalS3ExportDescription' {ExportStatus
status :: ExportStatus
$sel:status:JournalS3ExportDescription' :: JournalS3ExportDescription -> ExportStatus
status} -> ExportStatus
status) (\s :: JournalS3ExportDescription
s@JournalS3ExportDescription' {} ExportStatus
a -> JournalS3ExportDescription
s {$sel:status:JournalS3ExportDescription' :: ExportStatus
status = ExportStatus
a} :: JournalS3ExportDescription)
journalS3ExportDescription_inclusiveStartTime :: Lens.Lens' JournalS3ExportDescription Prelude.UTCTime
journalS3ExportDescription_inclusiveStartTime :: (UTCTime -> f UTCTime)
-> JournalS3ExportDescription -> f JournalS3ExportDescription
journalS3ExportDescription_inclusiveStartTime = (JournalS3ExportDescription -> POSIX)
-> (JournalS3ExportDescription
-> POSIX -> JournalS3ExportDescription)
-> Lens
JournalS3ExportDescription JournalS3ExportDescription POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JournalS3ExportDescription' {POSIX
inclusiveStartTime :: POSIX
$sel:inclusiveStartTime:JournalS3ExportDescription' :: JournalS3ExportDescription -> POSIX
inclusiveStartTime} -> POSIX
inclusiveStartTime) (\s :: JournalS3ExportDescription
s@JournalS3ExportDescription' {} POSIX
a -> JournalS3ExportDescription
s {$sel:inclusiveStartTime:JournalS3ExportDescription' :: POSIX
inclusiveStartTime = POSIX
a} :: JournalS3ExportDescription) ((POSIX -> f POSIX)
-> JournalS3ExportDescription -> f JournalS3ExportDescription)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> JournalS3ExportDescription
-> f JournalS3ExportDescription
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
journalS3ExportDescription_exclusiveEndTime :: Lens.Lens' JournalS3ExportDescription Prelude.UTCTime
journalS3ExportDescription_exclusiveEndTime :: (UTCTime -> f UTCTime)
-> JournalS3ExportDescription -> f JournalS3ExportDescription
journalS3ExportDescription_exclusiveEndTime = (JournalS3ExportDescription -> POSIX)
-> (JournalS3ExportDescription
-> POSIX -> JournalS3ExportDescription)
-> Lens
JournalS3ExportDescription JournalS3ExportDescription POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JournalS3ExportDescription' {POSIX
exclusiveEndTime :: POSIX
$sel:exclusiveEndTime:JournalS3ExportDescription' :: JournalS3ExportDescription -> POSIX
exclusiveEndTime} -> POSIX
exclusiveEndTime) (\s :: JournalS3ExportDescription
s@JournalS3ExportDescription' {} POSIX
a -> JournalS3ExportDescription
s {$sel:exclusiveEndTime:JournalS3ExportDescription' :: POSIX
exclusiveEndTime = POSIX
a} :: JournalS3ExportDescription) ((POSIX -> f POSIX)
-> JournalS3ExportDescription -> f JournalS3ExportDescription)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> JournalS3ExportDescription
-> f JournalS3ExportDescription
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
journalS3ExportDescription_s3ExportConfiguration :: Lens.Lens' JournalS3ExportDescription S3ExportConfiguration
journalS3ExportDescription_s3ExportConfiguration :: (S3ExportConfiguration -> f S3ExportConfiguration)
-> JournalS3ExportDescription -> f JournalS3ExportDescription
journalS3ExportDescription_s3ExportConfiguration = (JournalS3ExportDescription -> S3ExportConfiguration)
-> (JournalS3ExportDescription
-> S3ExportConfiguration -> JournalS3ExportDescription)
-> Lens
JournalS3ExportDescription
JournalS3ExportDescription
S3ExportConfiguration
S3ExportConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JournalS3ExportDescription' {S3ExportConfiguration
s3ExportConfiguration :: S3ExportConfiguration
$sel:s3ExportConfiguration:JournalS3ExportDescription' :: JournalS3ExportDescription -> S3ExportConfiguration
s3ExportConfiguration} -> S3ExportConfiguration
s3ExportConfiguration) (\s :: JournalS3ExportDescription
s@JournalS3ExportDescription' {} S3ExportConfiguration
a -> JournalS3ExportDescription
s {$sel:s3ExportConfiguration:JournalS3ExportDescription' :: S3ExportConfiguration
s3ExportConfiguration = S3ExportConfiguration
a} :: JournalS3ExportDescription)
journalS3ExportDescription_roleArn :: Lens.Lens' JournalS3ExportDescription Prelude.Text
journalS3ExportDescription_roleArn :: (Text -> f Text)
-> JournalS3ExportDescription -> f JournalS3ExportDescription
journalS3ExportDescription_roleArn = (JournalS3ExportDescription -> Text)
-> (JournalS3ExportDescription
-> Text -> JournalS3ExportDescription)
-> Lens
JournalS3ExportDescription JournalS3ExportDescription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JournalS3ExportDescription' {Text
roleArn :: Text
$sel:roleArn:JournalS3ExportDescription' :: JournalS3ExportDescription -> Text
roleArn} -> Text
roleArn) (\s :: JournalS3ExportDescription
s@JournalS3ExportDescription' {} Text
a -> JournalS3ExportDescription
s {$sel:roleArn:JournalS3ExportDescription' :: Text
roleArn = Text
a} :: JournalS3ExportDescription)
instance Core.FromJSON JournalS3ExportDescription where
parseJSON :: Value -> Parser JournalS3ExportDescription
parseJSON =
String
-> (Object -> Parser JournalS3ExportDescription)
-> Value
-> Parser JournalS3ExportDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"JournalS3ExportDescription"
( \Object
x ->
Text
-> Text
-> POSIX
-> ExportStatus
-> POSIX
-> POSIX
-> S3ExportConfiguration
-> Text
-> JournalS3ExportDescription
JournalS3ExportDescription'
(Text
-> Text
-> POSIX
-> ExportStatus
-> POSIX
-> POSIX
-> S3ExportConfiguration
-> Text
-> JournalS3ExportDescription)
-> Parser Text
-> Parser
(Text
-> POSIX
-> ExportStatus
-> POSIX
-> POSIX
-> S3ExportConfiguration
-> Text
-> JournalS3ExportDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"LedgerName")
Parser
(Text
-> POSIX
-> ExportStatus
-> POSIX
-> POSIX
-> S3ExportConfiguration
-> Text
-> JournalS3ExportDescription)
-> Parser Text
-> Parser
(POSIX
-> ExportStatus
-> POSIX
-> POSIX
-> S3ExportConfiguration
-> Text
-> JournalS3ExportDescription)
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
"ExportId")
Parser
(POSIX
-> ExportStatus
-> POSIX
-> POSIX
-> S3ExportConfiguration
-> Text
-> JournalS3ExportDescription)
-> Parser POSIX
-> Parser
(ExportStatus
-> POSIX
-> POSIX
-> S3ExportConfiguration
-> Text
-> JournalS3ExportDescription)
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
"ExportCreationTime")
Parser
(ExportStatus
-> POSIX
-> POSIX
-> S3ExportConfiguration
-> Text
-> JournalS3ExportDescription)
-> Parser ExportStatus
-> Parser
(POSIX
-> POSIX
-> S3ExportConfiguration
-> Text
-> JournalS3ExportDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ExportStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Status")
Parser
(POSIX
-> POSIX
-> S3ExportConfiguration
-> Text
-> JournalS3ExportDescription)
-> Parser POSIX
-> Parser
(POSIX
-> S3ExportConfiguration -> Text -> JournalS3ExportDescription)
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
"InclusiveStartTime")
Parser
(POSIX
-> S3ExportConfiguration -> Text -> JournalS3ExportDescription)
-> Parser POSIX
-> Parser
(S3ExportConfiguration -> Text -> JournalS3ExportDescription)
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
"ExclusiveEndTime")
Parser
(S3ExportConfiguration -> Text -> JournalS3ExportDescription)
-> Parser S3ExportConfiguration
-> Parser (Text -> JournalS3ExportDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser S3ExportConfiguration
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"S3ExportConfiguration")
Parser (Text -> JournalS3ExportDescription)
-> Parser Text -> Parser JournalS3ExportDescription
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
"RoleArn")
)
instance Prelude.Hashable JournalS3ExportDescription
instance Prelude.NFData JournalS3ExportDescription