{-# 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.CrawlerMetrics where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CrawlerMetrics = CrawlerMetrics'
{
CrawlerMetrics -> Maybe Double
lastRuntimeSeconds :: Prelude.Maybe Prelude.Double,
CrawlerMetrics -> Maybe Natural
tablesCreated :: Prelude.Maybe Prelude.Natural,
CrawlerMetrics -> Maybe Bool
stillEstimating :: Prelude.Maybe Prelude.Bool,
CrawlerMetrics -> Maybe Double
medianRuntimeSeconds :: Prelude.Maybe Prelude.Double,
CrawlerMetrics -> Maybe Double
timeLeftSeconds :: Prelude.Maybe Prelude.Double,
CrawlerMetrics -> Maybe Natural
tablesDeleted :: Prelude.Maybe Prelude.Natural,
CrawlerMetrics -> Maybe Natural
tablesUpdated :: Prelude.Maybe Prelude.Natural,
CrawlerMetrics -> Maybe Text
crawlerName :: Prelude.Maybe Prelude.Text
}
deriving (CrawlerMetrics -> CrawlerMetrics -> Bool
(CrawlerMetrics -> CrawlerMetrics -> Bool)
-> (CrawlerMetrics -> CrawlerMetrics -> Bool) -> Eq CrawlerMetrics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CrawlerMetrics -> CrawlerMetrics -> Bool
$c/= :: CrawlerMetrics -> CrawlerMetrics -> Bool
== :: CrawlerMetrics -> CrawlerMetrics -> Bool
$c== :: CrawlerMetrics -> CrawlerMetrics -> Bool
Prelude.Eq, ReadPrec [CrawlerMetrics]
ReadPrec CrawlerMetrics
Int -> ReadS CrawlerMetrics
ReadS [CrawlerMetrics]
(Int -> ReadS CrawlerMetrics)
-> ReadS [CrawlerMetrics]
-> ReadPrec CrawlerMetrics
-> ReadPrec [CrawlerMetrics]
-> Read CrawlerMetrics
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CrawlerMetrics]
$creadListPrec :: ReadPrec [CrawlerMetrics]
readPrec :: ReadPrec CrawlerMetrics
$creadPrec :: ReadPrec CrawlerMetrics
readList :: ReadS [CrawlerMetrics]
$creadList :: ReadS [CrawlerMetrics]
readsPrec :: Int -> ReadS CrawlerMetrics
$creadsPrec :: Int -> ReadS CrawlerMetrics
Prelude.Read, Int -> CrawlerMetrics -> ShowS
[CrawlerMetrics] -> ShowS
CrawlerMetrics -> String
(Int -> CrawlerMetrics -> ShowS)
-> (CrawlerMetrics -> String)
-> ([CrawlerMetrics] -> ShowS)
-> Show CrawlerMetrics
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CrawlerMetrics] -> ShowS
$cshowList :: [CrawlerMetrics] -> ShowS
show :: CrawlerMetrics -> String
$cshow :: CrawlerMetrics -> String
showsPrec :: Int -> CrawlerMetrics -> ShowS
$cshowsPrec :: Int -> CrawlerMetrics -> ShowS
Prelude.Show, (forall x. CrawlerMetrics -> Rep CrawlerMetrics x)
-> (forall x. Rep CrawlerMetrics x -> CrawlerMetrics)
-> Generic CrawlerMetrics
forall x. Rep CrawlerMetrics x -> CrawlerMetrics
forall x. CrawlerMetrics -> Rep CrawlerMetrics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CrawlerMetrics x -> CrawlerMetrics
$cfrom :: forall x. CrawlerMetrics -> Rep CrawlerMetrics x
Prelude.Generic)
newCrawlerMetrics ::
CrawlerMetrics
newCrawlerMetrics :: CrawlerMetrics
newCrawlerMetrics =
CrawlerMetrics' :: Maybe Double
-> Maybe Natural
-> Maybe Bool
-> Maybe Double
-> Maybe Double
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> CrawlerMetrics
CrawlerMetrics'
{ $sel:lastRuntimeSeconds:CrawlerMetrics' :: Maybe Double
lastRuntimeSeconds =
Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:tablesCreated:CrawlerMetrics' :: Maybe Natural
tablesCreated = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:stillEstimating:CrawlerMetrics' :: Maybe Bool
stillEstimating = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:medianRuntimeSeconds:CrawlerMetrics' :: Maybe Double
medianRuntimeSeconds = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:timeLeftSeconds:CrawlerMetrics' :: Maybe Double
timeLeftSeconds = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:tablesDeleted:CrawlerMetrics' :: Maybe Natural
tablesDeleted = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:tablesUpdated:CrawlerMetrics' :: Maybe Natural
tablesUpdated = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:crawlerName:CrawlerMetrics' :: Maybe Text
crawlerName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
crawlerMetrics_lastRuntimeSeconds :: Lens.Lens' CrawlerMetrics (Prelude.Maybe Prelude.Double)
crawlerMetrics_lastRuntimeSeconds :: (Maybe Double -> f (Maybe Double))
-> CrawlerMetrics -> f CrawlerMetrics
crawlerMetrics_lastRuntimeSeconds = (CrawlerMetrics -> Maybe Double)
-> (CrawlerMetrics -> Maybe Double -> CrawlerMetrics)
-> Lens CrawlerMetrics CrawlerMetrics (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CrawlerMetrics' {Maybe Double
lastRuntimeSeconds :: Maybe Double
$sel:lastRuntimeSeconds:CrawlerMetrics' :: CrawlerMetrics -> Maybe Double
lastRuntimeSeconds} -> Maybe Double
lastRuntimeSeconds) (\s :: CrawlerMetrics
s@CrawlerMetrics' {} Maybe Double
a -> CrawlerMetrics
s {$sel:lastRuntimeSeconds:CrawlerMetrics' :: Maybe Double
lastRuntimeSeconds = Maybe Double
a} :: CrawlerMetrics)
crawlerMetrics_tablesCreated :: Lens.Lens' CrawlerMetrics (Prelude.Maybe Prelude.Natural)
crawlerMetrics_tablesCreated :: (Maybe Natural -> f (Maybe Natural))
-> CrawlerMetrics -> f CrawlerMetrics
crawlerMetrics_tablesCreated = (CrawlerMetrics -> Maybe Natural)
-> (CrawlerMetrics -> Maybe Natural -> CrawlerMetrics)
-> Lens
CrawlerMetrics CrawlerMetrics (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CrawlerMetrics' {Maybe Natural
tablesCreated :: Maybe Natural
$sel:tablesCreated:CrawlerMetrics' :: CrawlerMetrics -> Maybe Natural
tablesCreated} -> Maybe Natural
tablesCreated) (\s :: CrawlerMetrics
s@CrawlerMetrics' {} Maybe Natural
a -> CrawlerMetrics
s {$sel:tablesCreated:CrawlerMetrics' :: Maybe Natural
tablesCreated = Maybe Natural
a} :: CrawlerMetrics)
crawlerMetrics_stillEstimating :: Lens.Lens' CrawlerMetrics (Prelude.Maybe Prelude.Bool)
crawlerMetrics_stillEstimating :: (Maybe Bool -> f (Maybe Bool))
-> CrawlerMetrics -> f CrawlerMetrics
crawlerMetrics_stillEstimating = (CrawlerMetrics -> Maybe Bool)
-> (CrawlerMetrics -> Maybe Bool -> CrawlerMetrics)
-> Lens CrawlerMetrics CrawlerMetrics (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CrawlerMetrics' {Maybe Bool
stillEstimating :: Maybe Bool
$sel:stillEstimating:CrawlerMetrics' :: CrawlerMetrics -> Maybe Bool
stillEstimating} -> Maybe Bool
stillEstimating) (\s :: CrawlerMetrics
s@CrawlerMetrics' {} Maybe Bool
a -> CrawlerMetrics
s {$sel:stillEstimating:CrawlerMetrics' :: Maybe Bool
stillEstimating = Maybe Bool
a} :: CrawlerMetrics)
crawlerMetrics_medianRuntimeSeconds :: Lens.Lens' CrawlerMetrics (Prelude.Maybe Prelude.Double)
crawlerMetrics_medianRuntimeSeconds :: (Maybe Double -> f (Maybe Double))
-> CrawlerMetrics -> f CrawlerMetrics
crawlerMetrics_medianRuntimeSeconds = (CrawlerMetrics -> Maybe Double)
-> (CrawlerMetrics -> Maybe Double -> CrawlerMetrics)
-> Lens CrawlerMetrics CrawlerMetrics (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CrawlerMetrics' {Maybe Double
medianRuntimeSeconds :: Maybe Double
$sel:medianRuntimeSeconds:CrawlerMetrics' :: CrawlerMetrics -> Maybe Double
medianRuntimeSeconds} -> Maybe Double
medianRuntimeSeconds) (\s :: CrawlerMetrics
s@CrawlerMetrics' {} Maybe Double
a -> CrawlerMetrics
s {$sel:medianRuntimeSeconds:CrawlerMetrics' :: Maybe Double
medianRuntimeSeconds = Maybe Double
a} :: CrawlerMetrics)
crawlerMetrics_timeLeftSeconds :: Lens.Lens' CrawlerMetrics (Prelude.Maybe Prelude.Double)
crawlerMetrics_timeLeftSeconds :: (Maybe Double -> f (Maybe Double))
-> CrawlerMetrics -> f CrawlerMetrics
crawlerMetrics_timeLeftSeconds = (CrawlerMetrics -> Maybe Double)
-> (CrawlerMetrics -> Maybe Double -> CrawlerMetrics)
-> Lens CrawlerMetrics CrawlerMetrics (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CrawlerMetrics' {Maybe Double
timeLeftSeconds :: Maybe Double
$sel:timeLeftSeconds:CrawlerMetrics' :: CrawlerMetrics -> Maybe Double
timeLeftSeconds} -> Maybe Double
timeLeftSeconds) (\s :: CrawlerMetrics
s@CrawlerMetrics' {} Maybe Double
a -> CrawlerMetrics
s {$sel:timeLeftSeconds:CrawlerMetrics' :: Maybe Double
timeLeftSeconds = Maybe Double
a} :: CrawlerMetrics)
crawlerMetrics_tablesDeleted :: Lens.Lens' CrawlerMetrics (Prelude.Maybe Prelude.Natural)
crawlerMetrics_tablesDeleted :: (Maybe Natural -> f (Maybe Natural))
-> CrawlerMetrics -> f CrawlerMetrics
crawlerMetrics_tablesDeleted = (CrawlerMetrics -> Maybe Natural)
-> (CrawlerMetrics -> Maybe Natural -> CrawlerMetrics)
-> Lens
CrawlerMetrics CrawlerMetrics (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CrawlerMetrics' {Maybe Natural
tablesDeleted :: Maybe Natural
$sel:tablesDeleted:CrawlerMetrics' :: CrawlerMetrics -> Maybe Natural
tablesDeleted} -> Maybe Natural
tablesDeleted) (\s :: CrawlerMetrics
s@CrawlerMetrics' {} Maybe Natural
a -> CrawlerMetrics
s {$sel:tablesDeleted:CrawlerMetrics' :: Maybe Natural
tablesDeleted = Maybe Natural
a} :: CrawlerMetrics)
crawlerMetrics_tablesUpdated :: Lens.Lens' CrawlerMetrics (Prelude.Maybe Prelude.Natural)
crawlerMetrics_tablesUpdated :: (Maybe Natural -> f (Maybe Natural))
-> CrawlerMetrics -> f CrawlerMetrics
crawlerMetrics_tablesUpdated = (CrawlerMetrics -> Maybe Natural)
-> (CrawlerMetrics -> Maybe Natural -> CrawlerMetrics)
-> Lens
CrawlerMetrics CrawlerMetrics (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CrawlerMetrics' {Maybe Natural
tablesUpdated :: Maybe Natural
$sel:tablesUpdated:CrawlerMetrics' :: CrawlerMetrics -> Maybe Natural
tablesUpdated} -> Maybe Natural
tablesUpdated) (\s :: CrawlerMetrics
s@CrawlerMetrics' {} Maybe Natural
a -> CrawlerMetrics
s {$sel:tablesUpdated:CrawlerMetrics' :: Maybe Natural
tablesUpdated = Maybe Natural
a} :: CrawlerMetrics)
crawlerMetrics_crawlerName :: Lens.Lens' CrawlerMetrics (Prelude.Maybe Prelude.Text)
crawlerMetrics_crawlerName :: (Maybe Text -> f (Maybe Text))
-> CrawlerMetrics -> f CrawlerMetrics
crawlerMetrics_crawlerName = (CrawlerMetrics -> Maybe Text)
-> (CrawlerMetrics -> Maybe Text -> CrawlerMetrics)
-> Lens CrawlerMetrics CrawlerMetrics (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CrawlerMetrics' {Maybe Text
crawlerName :: Maybe Text
$sel:crawlerName:CrawlerMetrics' :: CrawlerMetrics -> Maybe Text
crawlerName} -> Maybe Text
crawlerName) (\s :: CrawlerMetrics
s@CrawlerMetrics' {} Maybe Text
a -> CrawlerMetrics
s {$sel:crawlerName:CrawlerMetrics' :: Maybe Text
crawlerName = Maybe Text
a} :: CrawlerMetrics)
instance Core.FromJSON CrawlerMetrics where
parseJSON :: Value -> Parser CrawlerMetrics
parseJSON =
String
-> (Object -> Parser CrawlerMetrics)
-> Value
-> Parser CrawlerMetrics
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CrawlerMetrics"
( \Object
x ->
Maybe Double
-> Maybe Natural
-> Maybe Bool
-> Maybe Double
-> Maybe Double
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> CrawlerMetrics
CrawlerMetrics'
(Maybe Double
-> Maybe Natural
-> Maybe Bool
-> Maybe Double
-> Maybe Double
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> CrawlerMetrics)
-> Parser (Maybe Double)
-> Parser
(Maybe Natural
-> Maybe Bool
-> Maybe Double
-> Maybe Double
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> CrawlerMetrics)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastRuntimeSeconds")
Parser
(Maybe Natural
-> Maybe Bool
-> Maybe Double
-> Maybe Double
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> CrawlerMetrics)
-> Parser (Maybe Natural)
-> Parser
(Maybe Bool
-> Maybe Double
-> Maybe Double
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> CrawlerMetrics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TablesCreated")
Parser
(Maybe Bool
-> Maybe Double
-> Maybe Double
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> CrawlerMetrics)
-> Parser (Maybe Bool)
-> Parser
(Maybe Double
-> Maybe Double
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> CrawlerMetrics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StillEstimating")
Parser
(Maybe Double
-> Maybe Double
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> CrawlerMetrics)
-> Parser (Maybe Double)
-> Parser
(Maybe Double
-> Maybe Natural -> Maybe Natural -> Maybe Text -> CrawlerMetrics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MedianRuntimeSeconds")
Parser
(Maybe Double
-> Maybe Natural -> Maybe Natural -> Maybe Text -> CrawlerMetrics)
-> Parser (Maybe Double)
-> Parser
(Maybe Natural -> Maybe Natural -> Maybe Text -> CrawlerMetrics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TimeLeftSeconds")
Parser
(Maybe Natural -> Maybe Natural -> Maybe Text -> CrawlerMetrics)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> Maybe Text -> CrawlerMetrics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TablesDeleted")
Parser (Maybe Natural -> Maybe Text -> CrawlerMetrics)
-> Parser (Maybe Natural) -> Parser (Maybe Text -> CrawlerMetrics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TablesUpdated")
Parser (Maybe Text -> CrawlerMetrics)
-> Parser (Maybe Text) -> Parser CrawlerMetrics
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CrawlerName")
)
instance Prelude.Hashable CrawlerMetrics
instance Prelude.NFData CrawlerMetrics