{-# 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.ImportSummary 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.ImportResourceType
import Amazonka.LexV2Models.Types.ImportStatus
import Amazonka.LexV2Models.Types.MergeStrategy
import qualified Amazonka.Prelude as Prelude
data ImportSummary = ImportSummary'
{
ImportSummary -> Maybe POSIX
creationDateTime :: Prelude.Maybe Data.POSIX,
ImportSummary -> Maybe Text
importId :: Prelude.Maybe Prelude.Text,
ImportSummary -> Maybe ImportStatus
importStatus :: Prelude.Maybe ImportStatus,
ImportSummary -> Maybe Text
importedResourceId :: Prelude.Maybe Prelude.Text,
ImportSummary -> Maybe Text
importedResourceName :: Prelude.Maybe Prelude.Text,
ImportSummary -> Maybe ImportResourceType
importedResourceType :: Prelude.Maybe ImportResourceType,
ImportSummary -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Data.POSIX,
ImportSummary -> Maybe MergeStrategy
mergeStrategy :: Prelude.Maybe MergeStrategy
}
deriving (ImportSummary -> ImportSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportSummary -> ImportSummary -> Bool
$c/= :: ImportSummary -> ImportSummary -> Bool
== :: ImportSummary -> ImportSummary -> Bool
$c== :: ImportSummary -> ImportSummary -> Bool
Prelude.Eq, ReadPrec [ImportSummary]
ReadPrec ImportSummary
Int -> ReadS ImportSummary
ReadS [ImportSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportSummary]
$creadListPrec :: ReadPrec [ImportSummary]
readPrec :: ReadPrec ImportSummary
$creadPrec :: ReadPrec ImportSummary
readList :: ReadS [ImportSummary]
$creadList :: ReadS [ImportSummary]
readsPrec :: Int -> ReadS ImportSummary
$creadsPrec :: Int -> ReadS ImportSummary
Prelude.Read, Int -> ImportSummary -> ShowS
[ImportSummary] -> ShowS
ImportSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportSummary] -> ShowS
$cshowList :: [ImportSummary] -> ShowS
show :: ImportSummary -> String
$cshow :: ImportSummary -> String
showsPrec :: Int -> ImportSummary -> ShowS
$cshowsPrec :: Int -> ImportSummary -> ShowS
Prelude.Show, forall x. Rep ImportSummary x -> ImportSummary
forall x. ImportSummary -> Rep ImportSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImportSummary x -> ImportSummary
$cfrom :: forall x. ImportSummary -> Rep ImportSummary x
Prelude.Generic)
newImportSummary ::
ImportSummary
newImportSummary :: ImportSummary
newImportSummary =
ImportSummary'
{ $sel:creationDateTime:ImportSummary' :: Maybe POSIX
creationDateTime = forall a. Maybe a
Prelude.Nothing,
$sel:importId:ImportSummary' :: Maybe Text
importId = forall a. Maybe a
Prelude.Nothing,
$sel:importStatus:ImportSummary' :: Maybe ImportStatus
importStatus = forall a. Maybe a
Prelude.Nothing,
$sel:importedResourceId:ImportSummary' :: Maybe Text
importedResourceId = forall a. Maybe a
Prelude.Nothing,
$sel:importedResourceName:ImportSummary' :: Maybe Text
importedResourceName = forall a. Maybe a
Prelude.Nothing,
$sel:importedResourceType:ImportSummary' :: Maybe ImportResourceType
importedResourceType = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedDateTime:ImportSummary' :: Maybe POSIX
lastUpdatedDateTime = forall a. Maybe a
Prelude.Nothing,
$sel:mergeStrategy:ImportSummary' :: Maybe MergeStrategy
mergeStrategy = forall a. Maybe a
Prelude.Nothing
}
importSummary_creationDateTime :: Lens.Lens' ImportSummary (Prelude.Maybe Prelude.UTCTime)
importSummary_creationDateTime :: Lens' ImportSummary (Maybe UTCTime)
importSummary_creationDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportSummary' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:ImportSummary' :: ImportSummary -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: ImportSummary
s@ImportSummary' {} Maybe POSIX
a -> ImportSummary
s {$sel:creationDateTime:ImportSummary' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: ImportSummary) 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
importSummary_importId :: Lens.Lens' ImportSummary (Prelude.Maybe Prelude.Text)
importSummary_importId :: Lens' ImportSummary (Maybe Text)
importSummary_importId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportSummary' {Maybe Text
importId :: Maybe Text
$sel:importId:ImportSummary' :: ImportSummary -> Maybe Text
importId} -> Maybe Text
importId) (\s :: ImportSummary
s@ImportSummary' {} Maybe Text
a -> ImportSummary
s {$sel:importId:ImportSummary' :: Maybe Text
importId = Maybe Text
a} :: ImportSummary)
importSummary_importStatus :: Lens.Lens' ImportSummary (Prelude.Maybe ImportStatus)
importSummary_importStatus :: Lens' ImportSummary (Maybe ImportStatus)
importSummary_importStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportSummary' {Maybe ImportStatus
importStatus :: Maybe ImportStatus
$sel:importStatus:ImportSummary' :: ImportSummary -> Maybe ImportStatus
importStatus} -> Maybe ImportStatus
importStatus) (\s :: ImportSummary
s@ImportSummary' {} Maybe ImportStatus
a -> ImportSummary
s {$sel:importStatus:ImportSummary' :: Maybe ImportStatus
importStatus = Maybe ImportStatus
a} :: ImportSummary)
importSummary_importedResourceId :: Lens.Lens' ImportSummary (Prelude.Maybe Prelude.Text)
importSummary_importedResourceId :: Lens' ImportSummary (Maybe Text)
importSummary_importedResourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportSummary' {Maybe Text
importedResourceId :: Maybe Text
$sel:importedResourceId:ImportSummary' :: ImportSummary -> Maybe Text
importedResourceId} -> Maybe Text
importedResourceId) (\s :: ImportSummary
s@ImportSummary' {} Maybe Text
a -> ImportSummary
s {$sel:importedResourceId:ImportSummary' :: Maybe Text
importedResourceId = Maybe Text
a} :: ImportSummary)
importSummary_importedResourceName :: Lens.Lens' ImportSummary (Prelude.Maybe Prelude.Text)
importSummary_importedResourceName :: Lens' ImportSummary (Maybe Text)
importSummary_importedResourceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportSummary' {Maybe Text
importedResourceName :: Maybe Text
$sel:importedResourceName:ImportSummary' :: ImportSummary -> Maybe Text
importedResourceName} -> Maybe Text
importedResourceName) (\s :: ImportSummary
s@ImportSummary' {} Maybe Text
a -> ImportSummary
s {$sel:importedResourceName:ImportSummary' :: Maybe Text
importedResourceName = Maybe Text
a} :: ImportSummary)
importSummary_importedResourceType :: Lens.Lens' ImportSummary (Prelude.Maybe ImportResourceType)
importSummary_importedResourceType :: Lens' ImportSummary (Maybe ImportResourceType)
importSummary_importedResourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportSummary' {Maybe ImportResourceType
importedResourceType :: Maybe ImportResourceType
$sel:importedResourceType:ImportSummary' :: ImportSummary -> Maybe ImportResourceType
importedResourceType} -> Maybe ImportResourceType
importedResourceType) (\s :: ImportSummary
s@ImportSummary' {} Maybe ImportResourceType
a -> ImportSummary
s {$sel:importedResourceType:ImportSummary' :: Maybe ImportResourceType
importedResourceType = Maybe ImportResourceType
a} :: ImportSummary)
importSummary_lastUpdatedDateTime :: Lens.Lens' ImportSummary (Prelude.Maybe Prelude.UTCTime)
importSummary_lastUpdatedDateTime :: Lens' ImportSummary (Maybe UTCTime)
importSummary_lastUpdatedDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportSummary' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:ImportSummary' :: ImportSummary -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: ImportSummary
s@ImportSummary' {} Maybe POSIX
a -> ImportSummary
s {$sel:lastUpdatedDateTime:ImportSummary' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: ImportSummary) 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
importSummary_mergeStrategy :: Lens.Lens' ImportSummary (Prelude.Maybe MergeStrategy)
importSummary_mergeStrategy :: Lens' ImportSummary (Maybe MergeStrategy)
importSummary_mergeStrategy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportSummary' {Maybe MergeStrategy
mergeStrategy :: Maybe MergeStrategy
$sel:mergeStrategy:ImportSummary' :: ImportSummary -> Maybe MergeStrategy
mergeStrategy} -> Maybe MergeStrategy
mergeStrategy) (\s :: ImportSummary
s@ImportSummary' {} Maybe MergeStrategy
a -> ImportSummary
s {$sel:mergeStrategy:ImportSummary' :: Maybe MergeStrategy
mergeStrategy = Maybe MergeStrategy
a} :: ImportSummary)
instance Data.FromJSON ImportSummary where
parseJSON :: Value -> Parser ImportSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ImportSummary"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe ImportStatus
-> Maybe Text
-> Maybe Text
-> Maybe ImportResourceType
-> Maybe POSIX
-> Maybe MergeStrategy
-> ImportSummary
ImportSummary'
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
"importId")
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
"importStatus")
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
"importedResourceId")
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
"importedResourceName")
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
"importedResourceType")
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
"mergeStrategy")
)
instance Prelude.Hashable ImportSummary where
hashWithSalt :: Int -> ImportSummary -> Int
hashWithSalt Int
_salt ImportSummary' {Maybe Text
Maybe POSIX
Maybe ImportResourceType
Maybe ImportStatus
Maybe MergeStrategy
mergeStrategy :: Maybe MergeStrategy
lastUpdatedDateTime :: Maybe POSIX
importedResourceType :: Maybe ImportResourceType
importedResourceName :: Maybe Text
importedResourceId :: Maybe Text
importStatus :: Maybe ImportStatus
importId :: Maybe Text
creationDateTime :: Maybe POSIX
$sel:mergeStrategy:ImportSummary' :: ImportSummary -> Maybe MergeStrategy
$sel:lastUpdatedDateTime:ImportSummary' :: ImportSummary -> Maybe POSIX
$sel:importedResourceType:ImportSummary' :: ImportSummary -> Maybe ImportResourceType
$sel:importedResourceName:ImportSummary' :: ImportSummary -> Maybe Text
$sel:importedResourceId:ImportSummary' :: ImportSummary -> Maybe Text
$sel:importStatus:ImportSummary' :: ImportSummary -> Maybe ImportStatus
$sel:importId:ImportSummary' :: ImportSummary -> Maybe Text
$sel:creationDateTime:ImportSummary' :: ImportSummary -> 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
importId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ImportStatus
importStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
importedResourceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
importedResourceName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ImportResourceType
importedResourceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdatedDateTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MergeStrategy
mergeStrategy
instance Prelude.NFData ImportSummary where
rnf :: ImportSummary -> ()
rnf ImportSummary' {Maybe Text
Maybe POSIX
Maybe ImportResourceType
Maybe ImportStatus
Maybe MergeStrategy
mergeStrategy :: Maybe MergeStrategy
lastUpdatedDateTime :: Maybe POSIX
importedResourceType :: Maybe ImportResourceType
importedResourceName :: Maybe Text
importedResourceId :: Maybe Text
importStatus :: Maybe ImportStatus
importId :: Maybe Text
creationDateTime :: Maybe POSIX
$sel:mergeStrategy:ImportSummary' :: ImportSummary -> Maybe MergeStrategy
$sel:lastUpdatedDateTime:ImportSummary' :: ImportSummary -> Maybe POSIX
$sel:importedResourceType:ImportSummary' :: ImportSummary -> Maybe ImportResourceType
$sel:importedResourceName:ImportSummary' :: ImportSummary -> Maybe Text
$sel:importedResourceId:ImportSummary' :: ImportSummary -> Maybe Text
$sel:importStatus:ImportSummary' :: ImportSummary -> Maybe ImportStatus
$sel:importId:ImportSummary' :: ImportSummary -> Maybe Text
$sel:creationDateTime:ImportSummary' :: ImportSummary -> 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
importId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImportStatus
importStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
importedResourceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
importedResourceName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImportResourceType
importedResourceType
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 MergeStrategy
mergeStrategy