{-# 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.Discovery.Types.ExportInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Discovery.Types.ExportStatus
import qualified Amazonka.Prelude as Prelude
data ExportInfo = ExportInfo'
{
ExportInfo -> Maybe Text
configurationsDownloadUrl :: Prelude.Maybe Prelude.Text,
ExportInfo -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
ExportInfo -> Maybe POSIX
requestedEndTime :: Prelude.Maybe Data.POSIX,
ExportInfo -> Maybe POSIX
requestedStartTime :: Prelude.Maybe Data.POSIX,
ExportInfo -> Text
exportId :: Prelude.Text,
ExportInfo -> ExportStatus
exportStatus :: ExportStatus,
ExportInfo -> Text
statusMessage :: Prelude.Text,
ExportInfo -> POSIX
exportRequestTime :: Data.POSIX
}
deriving (ExportInfo -> ExportInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportInfo -> ExportInfo -> Bool
$c/= :: ExportInfo -> ExportInfo -> Bool
== :: ExportInfo -> ExportInfo -> Bool
$c== :: ExportInfo -> ExportInfo -> Bool
Prelude.Eq, ReadPrec [ExportInfo]
ReadPrec ExportInfo
Int -> ReadS ExportInfo
ReadS [ExportInfo]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportInfo]
$creadListPrec :: ReadPrec [ExportInfo]
readPrec :: ReadPrec ExportInfo
$creadPrec :: ReadPrec ExportInfo
readList :: ReadS [ExportInfo]
$creadList :: ReadS [ExportInfo]
readsPrec :: Int -> ReadS ExportInfo
$creadsPrec :: Int -> ReadS ExportInfo
Prelude.Read, Int -> ExportInfo -> ShowS
[ExportInfo] -> ShowS
ExportInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportInfo] -> ShowS
$cshowList :: [ExportInfo] -> ShowS
show :: ExportInfo -> String
$cshow :: ExportInfo -> String
showsPrec :: Int -> ExportInfo -> ShowS
$cshowsPrec :: Int -> ExportInfo -> ShowS
Prelude.Show, forall x. Rep ExportInfo x -> ExportInfo
forall x. ExportInfo -> Rep ExportInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExportInfo x -> ExportInfo
$cfrom :: forall x. ExportInfo -> Rep ExportInfo x
Prelude.Generic)
newExportInfo ::
Prelude.Text ->
ExportStatus ->
Prelude.Text ->
Prelude.UTCTime ->
ExportInfo
newExportInfo :: Text -> ExportStatus -> Text -> UTCTime -> ExportInfo
newExportInfo
Text
pExportId_
ExportStatus
pExportStatus_
Text
pStatusMessage_
UTCTime
pExportRequestTime_ =
ExportInfo'
{ $sel:configurationsDownloadUrl:ExportInfo' :: Maybe Text
configurationsDownloadUrl =
forall a. Maybe a
Prelude.Nothing,
$sel:isTruncated:ExportInfo' :: Maybe Bool
isTruncated = forall a. Maybe a
Prelude.Nothing,
$sel:requestedEndTime:ExportInfo' :: Maybe POSIX
requestedEndTime = forall a. Maybe a
Prelude.Nothing,
$sel:requestedStartTime:ExportInfo' :: Maybe POSIX
requestedStartTime = forall a. Maybe a
Prelude.Nothing,
$sel:exportId:ExportInfo' :: Text
exportId = Text
pExportId_,
$sel:exportStatus:ExportInfo' :: ExportStatus
exportStatus = ExportStatus
pExportStatus_,
$sel:statusMessage:ExportInfo' :: Text
statusMessage = Text
pStatusMessage_,
$sel:exportRequestTime:ExportInfo' :: POSIX
exportRequestTime =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pExportRequestTime_
}
exportInfo_configurationsDownloadUrl :: Lens.Lens' ExportInfo (Prelude.Maybe Prelude.Text)
exportInfo_configurationsDownloadUrl :: Lens' ExportInfo (Maybe Text)
exportInfo_configurationsDownloadUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportInfo' {Maybe Text
configurationsDownloadUrl :: Maybe Text
$sel:configurationsDownloadUrl:ExportInfo' :: ExportInfo -> Maybe Text
configurationsDownloadUrl} -> Maybe Text
configurationsDownloadUrl) (\s :: ExportInfo
s@ExportInfo' {} Maybe Text
a -> ExportInfo
s {$sel:configurationsDownloadUrl:ExportInfo' :: Maybe Text
configurationsDownloadUrl = Maybe Text
a} :: ExportInfo)
exportInfo_isTruncated :: Lens.Lens' ExportInfo (Prelude.Maybe Prelude.Bool)
exportInfo_isTruncated :: Lens' ExportInfo (Maybe Bool)
exportInfo_isTruncated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportInfo' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ExportInfo' :: ExportInfo -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ExportInfo
s@ExportInfo' {} Maybe Bool
a -> ExportInfo
s {$sel:isTruncated:ExportInfo' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ExportInfo)
exportInfo_requestedEndTime :: Lens.Lens' ExportInfo (Prelude.Maybe Prelude.UTCTime)
exportInfo_requestedEndTime :: Lens' ExportInfo (Maybe UTCTime)
exportInfo_requestedEndTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportInfo' {Maybe POSIX
requestedEndTime :: Maybe POSIX
$sel:requestedEndTime:ExportInfo' :: ExportInfo -> Maybe POSIX
requestedEndTime} -> Maybe POSIX
requestedEndTime) (\s :: ExportInfo
s@ExportInfo' {} Maybe POSIX
a -> ExportInfo
s {$sel:requestedEndTime:ExportInfo' :: Maybe POSIX
requestedEndTime = Maybe POSIX
a} :: ExportInfo) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
exportInfo_requestedStartTime :: Lens.Lens' ExportInfo (Prelude.Maybe Prelude.UTCTime)
exportInfo_requestedStartTime :: Lens' ExportInfo (Maybe UTCTime)
exportInfo_requestedStartTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportInfo' {Maybe POSIX
requestedStartTime :: Maybe POSIX
$sel:requestedStartTime:ExportInfo' :: ExportInfo -> Maybe POSIX
requestedStartTime} -> Maybe POSIX
requestedStartTime) (\s :: ExportInfo
s@ExportInfo' {} Maybe POSIX
a -> ExportInfo
s {$sel:requestedStartTime:ExportInfo' :: Maybe POSIX
requestedStartTime = Maybe POSIX
a} :: ExportInfo) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
exportInfo_exportId :: Lens.Lens' ExportInfo Prelude.Text
exportInfo_exportId :: Lens' ExportInfo Text
exportInfo_exportId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportInfo' {Text
exportId :: Text
$sel:exportId:ExportInfo' :: ExportInfo -> Text
exportId} -> Text
exportId) (\s :: ExportInfo
s@ExportInfo' {} Text
a -> ExportInfo
s {$sel:exportId:ExportInfo' :: Text
exportId = Text
a} :: ExportInfo)
exportInfo_exportStatus :: Lens.Lens' ExportInfo ExportStatus
exportInfo_exportStatus :: Lens' ExportInfo ExportStatus
exportInfo_exportStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportInfo' {ExportStatus
exportStatus :: ExportStatus
$sel:exportStatus:ExportInfo' :: ExportInfo -> ExportStatus
exportStatus} -> ExportStatus
exportStatus) (\s :: ExportInfo
s@ExportInfo' {} ExportStatus
a -> ExportInfo
s {$sel:exportStatus:ExportInfo' :: ExportStatus
exportStatus = ExportStatus
a} :: ExportInfo)
exportInfo_statusMessage :: Lens.Lens' ExportInfo Prelude.Text
exportInfo_statusMessage :: Lens' ExportInfo Text
exportInfo_statusMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportInfo' {Text
statusMessage :: Text
$sel:statusMessage:ExportInfo' :: ExportInfo -> Text
statusMessage} -> Text
statusMessage) (\s :: ExportInfo
s@ExportInfo' {} Text
a -> ExportInfo
s {$sel:statusMessage:ExportInfo' :: Text
statusMessage = Text
a} :: ExportInfo)
exportInfo_exportRequestTime :: Lens.Lens' ExportInfo Prelude.UTCTime
exportInfo_exportRequestTime :: Lens' ExportInfo UTCTime
exportInfo_exportRequestTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportInfo' {POSIX
exportRequestTime :: POSIX
$sel:exportRequestTime:ExportInfo' :: ExportInfo -> POSIX
exportRequestTime} -> POSIX
exportRequestTime) (\s :: ExportInfo
s@ExportInfo' {} POSIX
a -> ExportInfo
s {$sel:exportRequestTime:ExportInfo' :: POSIX
exportRequestTime = POSIX
a} :: ExportInfo) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON ExportInfo where
parseJSON :: Value -> Parser ExportInfo
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ExportInfo"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe POSIX
-> Maybe POSIX
-> Text
-> ExportStatus
-> Text
-> POSIX
-> ExportInfo
ExportInfo'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"configurationsDownloadUrl")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"isTruncated")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"requestedEndTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"requestedStartTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"exportId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"exportStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"statusMessage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"exportRequestTime")
)
instance Prelude.Hashable ExportInfo where
hashWithSalt :: Int -> ExportInfo -> Int
hashWithSalt Int
_salt ExportInfo' {Maybe Bool
Maybe Text
Maybe POSIX
Text
POSIX
ExportStatus
exportRequestTime :: POSIX
statusMessage :: Text
exportStatus :: ExportStatus
exportId :: Text
requestedStartTime :: Maybe POSIX
requestedEndTime :: Maybe POSIX
isTruncated :: Maybe Bool
configurationsDownloadUrl :: Maybe Text
$sel:exportRequestTime:ExportInfo' :: ExportInfo -> POSIX
$sel:statusMessage:ExportInfo' :: ExportInfo -> Text
$sel:exportStatus:ExportInfo' :: ExportInfo -> ExportStatus
$sel:exportId:ExportInfo' :: ExportInfo -> Text
$sel:requestedStartTime:ExportInfo' :: ExportInfo -> Maybe POSIX
$sel:requestedEndTime:ExportInfo' :: ExportInfo -> Maybe POSIX
$sel:isTruncated:ExportInfo' :: ExportInfo -> Maybe Bool
$sel:configurationsDownloadUrl:ExportInfo' :: ExportInfo -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
configurationsDownloadUrl
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
isTruncated
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
requestedEndTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
requestedStartTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
exportId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ExportStatus
exportStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
statusMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
exportRequestTime
instance Prelude.NFData ExportInfo where
rnf :: ExportInfo -> ()
rnf ExportInfo' {Maybe Bool
Maybe Text
Maybe POSIX
Text
POSIX
ExportStatus
exportRequestTime :: POSIX
statusMessage :: Text
exportStatus :: ExportStatus
exportId :: Text
requestedStartTime :: Maybe POSIX
requestedEndTime :: Maybe POSIX
isTruncated :: Maybe Bool
configurationsDownloadUrl :: Maybe Text
$sel:exportRequestTime:ExportInfo' :: ExportInfo -> POSIX
$sel:statusMessage:ExportInfo' :: ExportInfo -> Text
$sel:exportStatus:ExportInfo' :: ExportInfo -> ExportStatus
$sel:exportId:ExportInfo' :: ExportInfo -> Text
$sel:requestedStartTime:ExportInfo' :: ExportInfo -> Maybe POSIX
$sel:requestedEndTime:ExportInfo' :: ExportInfo -> Maybe POSIX
$sel:isTruncated:ExportInfo' :: ExportInfo -> Maybe Bool
$sel:configurationsDownloadUrl:ExportInfo' :: ExportInfo -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
configurationsDownloadUrl
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isTruncated
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
requestedEndTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
requestedStartTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
exportId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ExportStatus
exportStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
statusMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
exportRequestTime