{-# 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.LexV2Models.Types.ExportSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.LexV2Models.Types.ExportResourceSpecification
import Amazonka.LexV2Models.Types.ExportStatus
import Amazonka.LexV2Models.Types.ImportExportFileFormat
import qualified Amazonka.Prelude as Prelude
data ExportSummary = ExportSummary'
{
ExportSummary -> Maybe POSIX
creationDateTime :: Prelude.Maybe Data.POSIX,
ExportSummary -> Maybe Text
exportId :: Prelude.Maybe Prelude.Text,
ExportSummary -> Maybe ExportStatus
exportStatus :: Prelude.Maybe ExportStatus,
ExportSummary -> Maybe ImportExportFileFormat
fileFormat :: Prelude.Maybe ImportExportFileFormat,
ExportSummary -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Data.POSIX,
ExportSummary -> Maybe ExportResourceSpecification
resourceSpecification :: Prelude.Maybe ExportResourceSpecification
}
deriving (ExportSummary -> ExportSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportSummary -> ExportSummary -> Bool
$c/= :: ExportSummary -> ExportSummary -> Bool
== :: ExportSummary -> ExportSummary -> Bool
$c== :: ExportSummary -> ExportSummary -> Bool
Prelude.Eq, ReadPrec [ExportSummary]
ReadPrec ExportSummary
Int -> ReadS ExportSummary
ReadS [ExportSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportSummary]
$creadListPrec :: ReadPrec [ExportSummary]
readPrec :: ReadPrec ExportSummary
$creadPrec :: ReadPrec ExportSummary
readList :: ReadS [ExportSummary]
$creadList :: ReadS [ExportSummary]
readsPrec :: Int -> ReadS ExportSummary
$creadsPrec :: Int -> ReadS ExportSummary
Prelude.Read, Int -> ExportSummary -> ShowS
[ExportSummary] -> ShowS
ExportSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportSummary] -> ShowS
$cshowList :: [ExportSummary] -> ShowS
show :: ExportSummary -> String
$cshow :: ExportSummary -> String
showsPrec :: Int -> ExportSummary -> ShowS
$cshowsPrec :: Int -> ExportSummary -> ShowS
Prelude.Show, forall x. Rep ExportSummary x -> ExportSummary
forall x. ExportSummary -> Rep ExportSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExportSummary x -> ExportSummary
$cfrom :: forall x. ExportSummary -> Rep ExportSummary x
Prelude.Generic)
newExportSummary ::
ExportSummary
newExportSummary :: ExportSummary
newExportSummary =
ExportSummary'
{ $sel:creationDateTime:ExportSummary' :: Maybe POSIX
creationDateTime = forall a. Maybe a
Prelude.Nothing,
$sel:exportId:ExportSummary' :: Maybe Text
exportId = forall a. Maybe a
Prelude.Nothing,
$sel:exportStatus:ExportSummary' :: Maybe ExportStatus
exportStatus = forall a. Maybe a
Prelude.Nothing,
$sel:fileFormat:ExportSummary' :: Maybe ImportExportFileFormat
fileFormat = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedDateTime:ExportSummary' :: Maybe POSIX
lastUpdatedDateTime = forall a. Maybe a
Prelude.Nothing,
$sel:resourceSpecification:ExportSummary' :: Maybe ExportResourceSpecification
resourceSpecification = forall a. Maybe a
Prelude.Nothing
}
exportSummary_creationDateTime :: Lens.Lens' ExportSummary (Prelude.Maybe Prelude.UTCTime)
exportSummary_creationDateTime :: Lens' ExportSummary (Maybe UTCTime)
exportSummary_creationDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportSummary' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:ExportSummary' :: ExportSummary -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: ExportSummary
s@ExportSummary' {} Maybe POSIX
a -> ExportSummary
s {$sel:creationDateTime:ExportSummary' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: ExportSummary) 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
exportSummary_exportId :: Lens.Lens' ExportSummary (Prelude.Maybe Prelude.Text)
exportSummary_exportId :: Lens' ExportSummary (Maybe Text)
exportSummary_exportId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportSummary' {Maybe Text
exportId :: Maybe Text
$sel:exportId:ExportSummary' :: ExportSummary -> Maybe Text
exportId} -> Maybe Text
exportId) (\s :: ExportSummary
s@ExportSummary' {} Maybe Text
a -> ExportSummary
s {$sel:exportId:ExportSummary' :: Maybe Text
exportId = Maybe Text
a} :: ExportSummary)
exportSummary_exportStatus :: Lens.Lens' ExportSummary (Prelude.Maybe ExportStatus)
exportSummary_exportStatus :: Lens' ExportSummary (Maybe ExportStatus)
exportSummary_exportStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportSummary' {Maybe ExportStatus
exportStatus :: Maybe ExportStatus
$sel:exportStatus:ExportSummary' :: ExportSummary -> Maybe ExportStatus
exportStatus} -> Maybe ExportStatus
exportStatus) (\s :: ExportSummary
s@ExportSummary' {} Maybe ExportStatus
a -> ExportSummary
s {$sel:exportStatus:ExportSummary' :: Maybe ExportStatus
exportStatus = Maybe ExportStatus
a} :: ExportSummary)
exportSummary_fileFormat :: Lens.Lens' ExportSummary (Prelude.Maybe ImportExportFileFormat)
exportSummary_fileFormat :: Lens' ExportSummary (Maybe ImportExportFileFormat)
exportSummary_fileFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportSummary' {Maybe ImportExportFileFormat
fileFormat :: Maybe ImportExportFileFormat
$sel:fileFormat:ExportSummary' :: ExportSummary -> Maybe ImportExportFileFormat
fileFormat} -> Maybe ImportExportFileFormat
fileFormat) (\s :: ExportSummary
s@ExportSummary' {} Maybe ImportExportFileFormat
a -> ExportSummary
s {$sel:fileFormat:ExportSummary' :: Maybe ImportExportFileFormat
fileFormat = Maybe ImportExportFileFormat
a} :: ExportSummary)
exportSummary_lastUpdatedDateTime :: Lens.Lens' ExportSummary (Prelude.Maybe Prelude.UTCTime)
exportSummary_lastUpdatedDateTime :: Lens' ExportSummary (Maybe UTCTime)
exportSummary_lastUpdatedDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportSummary' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:ExportSummary' :: ExportSummary -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: ExportSummary
s@ExportSummary' {} Maybe POSIX
a -> ExportSummary
s {$sel:lastUpdatedDateTime:ExportSummary' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: ExportSummary) 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
exportSummary_resourceSpecification :: Lens.Lens' ExportSummary (Prelude.Maybe ExportResourceSpecification)
exportSummary_resourceSpecification :: Lens' ExportSummary (Maybe ExportResourceSpecification)
exportSummary_resourceSpecification = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportSummary' {Maybe ExportResourceSpecification
resourceSpecification :: Maybe ExportResourceSpecification
$sel:resourceSpecification:ExportSummary' :: ExportSummary -> Maybe ExportResourceSpecification
resourceSpecification} -> Maybe ExportResourceSpecification
resourceSpecification) (\s :: ExportSummary
s@ExportSummary' {} Maybe ExportResourceSpecification
a -> ExportSummary
s {$sel:resourceSpecification:ExportSummary' :: Maybe ExportResourceSpecification
resourceSpecification = Maybe ExportResourceSpecification
a} :: ExportSummary)
instance Data.FromJSON ExportSummary where
parseJSON :: Value -> Parser ExportSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ExportSummary"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe ExportStatus
-> Maybe ImportExportFileFormat
-> Maybe POSIX
-> Maybe ExportResourceSpecification
-> ExportSummary
ExportSummary'
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
"creationDateTime")
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
"exportId")
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
"exportStatus")
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
"fileFormat")
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
"lastUpdatedDateTime")
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
"resourceSpecification")
)
instance Prelude.Hashable ExportSummary where
hashWithSalt :: Int -> ExportSummary -> Int
hashWithSalt Int
_salt ExportSummary' {Maybe Text
Maybe POSIX
Maybe ExportResourceSpecification
Maybe ExportStatus
Maybe ImportExportFileFormat
resourceSpecification :: Maybe ExportResourceSpecification
lastUpdatedDateTime :: Maybe POSIX
fileFormat :: Maybe ImportExportFileFormat
exportStatus :: Maybe ExportStatus
exportId :: Maybe Text
creationDateTime :: Maybe POSIX
$sel:resourceSpecification:ExportSummary' :: ExportSummary -> Maybe ExportResourceSpecification
$sel:lastUpdatedDateTime:ExportSummary' :: ExportSummary -> Maybe POSIX
$sel:fileFormat:ExportSummary' :: ExportSummary -> Maybe ImportExportFileFormat
$sel:exportStatus:ExportSummary' :: ExportSummary -> Maybe ExportStatus
$sel:exportId:ExportSummary' :: ExportSummary -> Maybe Text
$sel:creationDateTime:ExportSummary' :: ExportSummary -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationDateTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
exportId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ExportStatus
exportStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ImportExportFileFormat
fileFormat
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdatedDateTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ExportResourceSpecification
resourceSpecification
instance Prelude.NFData ExportSummary where
rnf :: ExportSummary -> ()
rnf ExportSummary' {Maybe Text
Maybe POSIX
Maybe ExportResourceSpecification
Maybe ExportStatus
Maybe ImportExportFileFormat
resourceSpecification :: Maybe ExportResourceSpecification
lastUpdatedDateTime :: Maybe POSIX
fileFormat :: Maybe ImportExportFileFormat
exportStatus :: Maybe ExportStatus
exportId :: Maybe Text
creationDateTime :: Maybe POSIX
$sel:resourceSpecification:ExportSummary' :: ExportSummary -> Maybe ExportResourceSpecification
$sel:lastUpdatedDateTime:ExportSummary' :: ExportSummary -> Maybe POSIX
$sel:fileFormat:ExportSummary' :: ExportSummary -> Maybe ImportExportFileFormat
$sel:exportStatus:ExportSummary' :: ExportSummary -> Maybe ExportStatus
$sel:exportId:ExportSummary' :: ExportSummary -> Maybe Text
$sel:creationDateTime:ExportSummary' :: ExportSummary -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationDateTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
exportId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ExportStatus
exportStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImportExportFileFormat
fileFormat
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdatedDateTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ExportResourceSpecification
resourceSpecification