{-# 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.LastCrawlInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Glue.Types.LastCrawlStatus
import qualified Amazonka.Prelude as Prelude
data LastCrawlInfo = LastCrawlInfo'
{
LastCrawlInfo -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
LastCrawlInfo -> Maybe Text
logGroup :: Prelude.Maybe Prelude.Text,
LastCrawlInfo -> Maybe Text
logStream :: Prelude.Maybe Prelude.Text,
LastCrawlInfo -> Maybe Text
messagePrefix :: Prelude.Maybe Prelude.Text,
LastCrawlInfo -> Maybe POSIX
startTime :: Prelude.Maybe Data.POSIX,
LastCrawlInfo -> Maybe LastCrawlStatus
status :: Prelude.Maybe LastCrawlStatus
}
deriving (LastCrawlInfo -> LastCrawlInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LastCrawlInfo -> LastCrawlInfo -> Bool
$c/= :: LastCrawlInfo -> LastCrawlInfo -> Bool
== :: LastCrawlInfo -> LastCrawlInfo -> Bool
$c== :: LastCrawlInfo -> LastCrawlInfo -> Bool
Prelude.Eq, ReadPrec [LastCrawlInfo]
ReadPrec LastCrawlInfo
Int -> ReadS LastCrawlInfo
ReadS [LastCrawlInfo]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LastCrawlInfo]
$creadListPrec :: ReadPrec [LastCrawlInfo]
readPrec :: ReadPrec LastCrawlInfo
$creadPrec :: ReadPrec LastCrawlInfo
readList :: ReadS [LastCrawlInfo]
$creadList :: ReadS [LastCrawlInfo]
readsPrec :: Int -> ReadS LastCrawlInfo
$creadsPrec :: Int -> ReadS LastCrawlInfo
Prelude.Read, Int -> LastCrawlInfo -> ShowS
[LastCrawlInfo] -> ShowS
LastCrawlInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LastCrawlInfo] -> ShowS
$cshowList :: [LastCrawlInfo] -> ShowS
show :: LastCrawlInfo -> String
$cshow :: LastCrawlInfo -> String
showsPrec :: Int -> LastCrawlInfo -> ShowS
$cshowsPrec :: Int -> LastCrawlInfo -> ShowS
Prelude.Show, forall x. Rep LastCrawlInfo x -> LastCrawlInfo
forall x. LastCrawlInfo -> Rep LastCrawlInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LastCrawlInfo x -> LastCrawlInfo
$cfrom :: forall x. LastCrawlInfo -> Rep LastCrawlInfo x
Prelude.Generic)
newLastCrawlInfo ::
LastCrawlInfo
newLastCrawlInfo :: LastCrawlInfo
newLastCrawlInfo =
LastCrawlInfo'
{ $sel:errorMessage:LastCrawlInfo' :: Maybe Text
errorMessage = forall a. Maybe a
Prelude.Nothing,
$sel:logGroup:LastCrawlInfo' :: Maybe Text
logGroup = forall a. Maybe a
Prelude.Nothing,
$sel:logStream:LastCrawlInfo' :: Maybe Text
logStream = forall a. Maybe a
Prelude.Nothing,
$sel:messagePrefix:LastCrawlInfo' :: Maybe Text
messagePrefix = forall a. Maybe a
Prelude.Nothing,
$sel:startTime:LastCrawlInfo' :: Maybe POSIX
startTime = forall a. Maybe a
Prelude.Nothing,
$sel:status:LastCrawlInfo' :: Maybe LastCrawlStatus
status = forall a. Maybe a
Prelude.Nothing
}
lastCrawlInfo_errorMessage :: Lens.Lens' LastCrawlInfo (Prelude.Maybe Prelude.Text)
lastCrawlInfo_errorMessage :: Lens' LastCrawlInfo (Maybe Text)
lastCrawlInfo_errorMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LastCrawlInfo' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:LastCrawlInfo' :: LastCrawlInfo -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: LastCrawlInfo
s@LastCrawlInfo' {} Maybe Text
a -> LastCrawlInfo
s {$sel:errorMessage:LastCrawlInfo' :: Maybe Text
errorMessage = Maybe Text
a} :: LastCrawlInfo)
lastCrawlInfo_logGroup :: Lens.Lens' LastCrawlInfo (Prelude.Maybe Prelude.Text)
lastCrawlInfo_logGroup :: Lens' LastCrawlInfo (Maybe Text)
lastCrawlInfo_logGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LastCrawlInfo' {Maybe Text
logGroup :: Maybe Text
$sel:logGroup:LastCrawlInfo' :: LastCrawlInfo -> Maybe Text
logGroup} -> Maybe Text
logGroup) (\s :: LastCrawlInfo
s@LastCrawlInfo' {} Maybe Text
a -> LastCrawlInfo
s {$sel:logGroup:LastCrawlInfo' :: Maybe Text
logGroup = Maybe Text
a} :: LastCrawlInfo)
lastCrawlInfo_logStream :: Lens.Lens' LastCrawlInfo (Prelude.Maybe Prelude.Text)
lastCrawlInfo_logStream :: Lens' LastCrawlInfo (Maybe Text)
lastCrawlInfo_logStream = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LastCrawlInfo' {Maybe Text
logStream :: Maybe Text
$sel:logStream:LastCrawlInfo' :: LastCrawlInfo -> Maybe Text
logStream} -> Maybe Text
logStream) (\s :: LastCrawlInfo
s@LastCrawlInfo' {} Maybe Text
a -> LastCrawlInfo
s {$sel:logStream:LastCrawlInfo' :: Maybe Text
logStream = Maybe Text
a} :: LastCrawlInfo)
lastCrawlInfo_messagePrefix :: Lens.Lens' LastCrawlInfo (Prelude.Maybe Prelude.Text)
lastCrawlInfo_messagePrefix :: Lens' LastCrawlInfo (Maybe Text)
lastCrawlInfo_messagePrefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LastCrawlInfo' {Maybe Text
messagePrefix :: Maybe Text
$sel:messagePrefix:LastCrawlInfo' :: LastCrawlInfo -> Maybe Text
messagePrefix} -> Maybe Text
messagePrefix) (\s :: LastCrawlInfo
s@LastCrawlInfo' {} Maybe Text
a -> LastCrawlInfo
s {$sel:messagePrefix:LastCrawlInfo' :: Maybe Text
messagePrefix = Maybe Text
a} :: LastCrawlInfo)
lastCrawlInfo_startTime :: Lens.Lens' LastCrawlInfo (Prelude.Maybe Prelude.UTCTime)
lastCrawlInfo_startTime :: Lens' LastCrawlInfo (Maybe UTCTime)
lastCrawlInfo_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LastCrawlInfo' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:LastCrawlInfo' :: LastCrawlInfo -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: LastCrawlInfo
s@LastCrawlInfo' {} Maybe POSIX
a -> LastCrawlInfo
s {$sel:startTime:LastCrawlInfo' :: Maybe POSIX
startTime = Maybe POSIX
a} :: LastCrawlInfo) 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
lastCrawlInfo_status :: Lens.Lens' LastCrawlInfo (Prelude.Maybe LastCrawlStatus)
lastCrawlInfo_status :: Lens' LastCrawlInfo (Maybe LastCrawlStatus)
lastCrawlInfo_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LastCrawlInfo' {Maybe LastCrawlStatus
status :: Maybe LastCrawlStatus
$sel:status:LastCrawlInfo' :: LastCrawlInfo -> Maybe LastCrawlStatus
status} -> Maybe LastCrawlStatus
status) (\s :: LastCrawlInfo
s@LastCrawlInfo' {} Maybe LastCrawlStatus
a -> LastCrawlInfo
s {$sel:status:LastCrawlInfo' :: Maybe LastCrawlStatus
status = Maybe LastCrawlStatus
a} :: LastCrawlInfo)
instance Data.FromJSON LastCrawlInfo where
parseJSON :: Value -> Parser LastCrawlInfo
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LastCrawlInfo"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe LastCrawlStatus
-> LastCrawlInfo
LastCrawlInfo'
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
"ErrorMessage")
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
"LogGroup")
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
"LogStream")
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
"MessagePrefix")
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
"StartTime")
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
"Status")
)
instance Prelude.Hashable LastCrawlInfo where
hashWithSalt :: Int -> LastCrawlInfo -> Int
hashWithSalt Int
_salt LastCrawlInfo' {Maybe Text
Maybe POSIX
Maybe LastCrawlStatus
status :: Maybe LastCrawlStatus
startTime :: Maybe POSIX
messagePrefix :: Maybe Text
logStream :: Maybe Text
logGroup :: Maybe Text
errorMessage :: Maybe Text
$sel:status:LastCrawlInfo' :: LastCrawlInfo -> Maybe LastCrawlStatus
$sel:startTime:LastCrawlInfo' :: LastCrawlInfo -> Maybe POSIX
$sel:messagePrefix:LastCrawlInfo' :: LastCrawlInfo -> Maybe Text
$sel:logStream:LastCrawlInfo' :: LastCrawlInfo -> Maybe Text
$sel:logGroup:LastCrawlInfo' :: LastCrawlInfo -> Maybe Text
$sel:errorMessage:LastCrawlInfo' :: LastCrawlInfo -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
logGroup
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
logStream
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
messagePrefix
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
startTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LastCrawlStatus
status
instance Prelude.NFData LastCrawlInfo where
rnf :: LastCrawlInfo -> ()
rnf LastCrawlInfo' {Maybe Text
Maybe POSIX
Maybe LastCrawlStatus
status :: Maybe LastCrawlStatus
startTime :: Maybe POSIX
messagePrefix :: Maybe Text
logStream :: Maybe Text
logGroup :: Maybe Text
errorMessage :: Maybe Text
$sel:status:LastCrawlInfo' :: LastCrawlInfo -> Maybe LastCrawlStatus
$sel:startTime:LastCrawlInfo' :: LastCrawlInfo -> Maybe POSIX
$sel:messagePrefix:LastCrawlInfo' :: LastCrawlInfo -> Maybe Text
$sel:logStream:LastCrawlInfo' :: LastCrawlInfo -> Maybe Text
$sel:logGroup:LastCrawlInfo' :: LastCrawlInfo -> Maybe Text
$sel:errorMessage:LastCrawlInfo' :: LastCrawlInfo -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
logGroup
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
logStream
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
messagePrefix
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
startTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LastCrawlStatus
status