{-# 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.Glue.Types.CatalogImportStatus where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data CatalogImportStatus = CatalogImportStatus'
{
CatalogImportStatus -> Maybe Bool
importCompleted :: Prelude.Maybe Prelude.Bool,
CatalogImportStatus -> Maybe POSIX
importTime :: Prelude.Maybe Data.POSIX,
CatalogImportStatus -> Maybe Text
importedBy :: Prelude.Maybe Prelude.Text
}
deriving (CatalogImportStatus -> CatalogImportStatus -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CatalogImportStatus -> CatalogImportStatus -> Bool
$c/= :: CatalogImportStatus -> CatalogImportStatus -> Bool
== :: CatalogImportStatus -> CatalogImportStatus -> Bool
$c== :: CatalogImportStatus -> CatalogImportStatus -> Bool
Prelude.Eq, ReadPrec [CatalogImportStatus]
ReadPrec CatalogImportStatus
Int -> ReadS CatalogImportStatus
ReadS [CatalogImportStatus]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CatalogImportStatus]
$creadListPrec :: ReadPrec [CatalogImportStatus]
readPrec :: ReadPrec CatalogImportStatus
$creadPrec :: ReadPrec CatalogImportStatus
readList :: ReadS [CatalogImportStatus]
$creadList :: ReadS [CatalogImportStatus]
readsPrec :: Int -> ReadS CatalogImportStatus
$creadsPrec :: Int -> ReadS CatalogImportStatus
Prelude.Read, Int -> CatalogImportStatus -> ShowS
[CatalogImportStatus] -> ShowS
CatalogImportStatus -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CatalogImportStatus] -> ShowS
$cshowList :: [CatalogImportStatus] -> ShowS
show :: CatalogImportStatus -> String
$cshow :: CatalogImportStatus -> String
showsPrec :: Int -> CatalogImportStatus -> ShowS
$cshowsPrec :: Int -> CatalogImportStatus -> ShowS
Prelude.Show, forall x. Rep CatalogImportStatus x -> CatalogImportStatus
forall x. CatalogImportStatus -> Rep CatalogImportStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CatalogImportStatus x -> CatalogImportStatus
$cfrom :: forall x. CatalogImportStatus -> Rep CatalogImportStatus x
Prelude.Generic)
newCatalogImportStatus ::
CatalogImportStatus
newCatalogImportStatus :: CatalogImportStatus
newCatalogImportStatus =
CatalogImportStatus'
{ $sel:importCompleted:CatalogImportStatus' :: Maybe Bool
importCompleted =
forall a. Maybe a
Prelude.Nothing,
$sel:importTime:CatalogImportStatus' :: Maybe POSIX
importTime = forall a. Maybe a
Prelude.Nothing,
$sel:importedBy:CatalogImportStatus' :: Maybe Text
importedBy = forall a. Maybe a
Prelude.Nothing
}
catalogImportStatus_importCompleted :: Lens.Lens' CatalogImportStatus (Prelude.Maybe Prelude.Bool)
catalogImportStatus_importCompleted :: Lens' CatalogImportStatus (Maybe Bool)
catalogImportStatus_importCompleted = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CatalogImportStatus' {Maybe Bool
importCompleted :: Maybe Bool
$sel:importCompleted:CatalogImportStatus' :: CatalogImportStatus -> Maybe Bool
importCompleted} -> Maybe Bool
importCompleted) (\s :: CatalogImportStatus
s@CatalogImportStatus' {} Maybe Bool
a -> CatalogImportStatus
s {$sel:importCompleted:CatalogImportStatus' :: Maybe Bool
importCompleted = Maybe Bool
a} :: CatalogImportStatus)
catalogImportStatus_importTime :: Lens.Lens' CatalogImportStatus (Prelude.Maybe Prelude.UTCTime)
catalogImportStatus_importTime :: Lens' CatalogImportStatus (Maybe UTCTime)
catalogImportStatus_importTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CatalogImportStatus' {Maybe POSIX
importTime :: Maybe POSIX
$sel:importTime:CatalogImportStatus' :: CatalogImportStatus -> Maybe POSIX
importTime} -> Maybe POSIX
importTime) (\s :: CatalogImportStatus
s@CatalogImportStatus' {} Maybe POSIX
a -> CatalogImportStatus
s {$sel:importTime:CatalogImportStatus' :: Maybe POSIX
importTime = Maybe POSIX
a} :: CatalogImportStatus) 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
catalogImportStatus_importedBy :: Lens.Lens' CatalogImportStatus (Prelude.Maybe Prelude.Text)
catalogImportStatus_importedBy :: Lens' CatalogImportStatus (Maybe Text)
catalogImportStatus_importedBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CatalogImportStatus' {Maybe Text
importedBy :: Maybe Text
$sel:importedBy:CatalogImportStatus' :: CatalogImportStatus -> Maybe Text
importedBy} -> Maybe Text
importedBy) (\s :: CatalogImportStatus
s@CatalogImportStatus' {} Maybe Text
a -> CatalogImportStatus
s {$sel:importedBy:CatalogImportStatus' :: Maybe Text
importedBy = Maybe Text
a} :: CatalogImportStatus)
instance Data.FromJSON CatalogImportStatus where
parseJSON :: Value -> Parser CatalogImportStatus
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CatalogImportStatus"
( \Object
x ->
Maybe Bool -> Maybe POSIX -> Maybe Text -> CatalogImportStatus
CatalogImportStatus'
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
"ImportCompleted")
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
"ImportTime")
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
"ImportedBy")
)
instance Prelude.Hashable CatalogImportStatus where
hashWithSalt :: Int -> CatalogImportStatus -> Int
hashWithSalt Int
_salt CatalogImportStatus' {Maybe Bool
Maybe Text
Maybe POSIX
importedBy :: Maybe Text
importTime :: Maybe POSIX
importCompleted :: Maybe Bool
$sel:importedBy:CatalogImportStatus' :: CatalogImportStatus -> Maybe Text
$sel:importTime:CatalogImportStatus' :: CatalogImportStatus -> Maybe POSIX
$sel:importCompleted:CatalogImportStatus' :: CatalogImportStatus -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
importCompleted
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
importTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
importedBy
instance Prelude.NFData CatalogImportStatus where
rnf :: CatalogImportStatus -> ()
rnf CatalogImportStatus' {Maybe Bool
Maybe Text
Maybe POSIX
importedBy :: Maybe Text
importTime :: Maybe POSIX
importCompleted :: Maybe Bool
$sel:importedBy:CatalogImportStatus' :: CatalogImportStatus -> Maybe Text
$sel:importTime:CatalogImportStatus' :: CatalogImportStatus -> Maybe POSIX
$sel:importCompleted:CatalogImportStatus' :: CatalogImportStatus -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
importCompleted
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
importTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
importedBy