{-# 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.Athena.Types.QueryExecutionStatistics where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data QueryExecutionStatistics = QueryExecutionStatistics'
{
QueryExecutionStatistics -> Maybe Integer
totalExecutionTimeInMillis :: Prelude.Maybe Prelude.Integer,
QueryExecutionStatistics -> Maybe Integer
engineExecutionTimeInMillis :: Prelude.Maybe Prelude.Integer,
QueryExecutionStatistics -> Maybe Integer
queryPlanningTimeInMillis :: Prelude.Maybe Prelude.Integer,
QueryExecutionStatistics -> Maybe Integer
dataScannedInBytes :: Prelude.Maybe Prelude.Integer,
QueryExecutionStatistics -> Maybe Integer
queryQueueTimeInMillis :: Prelude.Maybe Prelude.Integer,
QueryExecutionStatistics -> Maybe Text
dataManifestLocation :: Prelude.Maybe Prelude.Text,
QueryExecutionStatistics -> Maybe Integer
serviceProcessingTimeInMillis :: Prelude.Maybe Prelude.Integer
}
deriving (QueryExecutionStatistics -> QueryExecutionStatistics -> Bool
(QueryExecutionStatistics -> QueryExecutionStatistics -> Bool)
-> (QueryExecutionStatistics -> QueryExecutionStatistics -> Bool)
-> Eq QueryExecutionStatistics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: QueryExecutionStatistics -> QueryExecutionStatistics -> Bool
$c/= :: QueryExecutionStatistics -> QueryExecutionStatistics -> Bool
== :: QueryExecutionStatistics -> QueryExecutionStatistics -> Bool
$c== :: QueryExecutionStatistics -> QueryExecutionStatistics -> Bool
Prelude.Eq, ReadPrec [QueryExecutionStatistics]
ReadPrec QueryExecutionStatistics
Int -> ReadS QueryExecutionStatistics
ReadS [QueryExecutionStatistics]
(Int -> ReadS QueryExecutionStatistics)
-> ReadS [QueryExecutionStatistics]
-> ReadPrec QueryExecutionStatistics
-> ReadPrec [QueryExecutionStatistics]
-> Read QueryExecutionStatistics
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [QueryExecutionStatistics]
$creadListPrec :: ReadPrec [QueryExecutionStatistics]
readPrec :: ReadPrec QueryExecutionStatistics
$creadPrec :: ReadPrec QueryExecutionStatistics
readList :: ReadS [QueryExecutionStatistics]
$creadList :: ReadS [QueryExecutionStatistics]
readsPrec :: Int -> ReadS QueryExecutionStatistics
$creadsPrec :: Int -> ReadS QueryExecutionStatistics
Prelude.Read, Int -> QueryExecutionStatistics -> ShowS
[QueryExecutionStatistics] -> ShowS
QueryExecutionStatistics -> String
(Int -> QueryExecutionStatistics -> ShowS)
-> (QueryExecutionStatistics -> String)
-> ([QueryExecutionStatistics] -> ShowS)
-> Show QueryExecutionStatistics
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [QueryExecutionStatistics] -> ShowS
$cshowList :: [QueryExecutionStatistics] -> ShowS
show :: QueryExecutionStatistics -> String
$cshow :: QueryExecutionStatistics -> String
showsPrec :: Int -> QueryExecutionStatistics -> ShowS
$cshowsPrec :: Int -> QueryExecutionStatistics -> ShowS
Prelude.Show, (forall x.
QueryExecutionStatistics -> Rep QueryExecutionStatistics x)
-> (forall x.
Rep QueryExecutionStatistics x -> QueryExecutionStatistics)
-> Generic QueryExecutionStatistics
forall x.
Rep QueryExecutionStatistics x -> QueryExecutionStatistics
forall x.
QueryExecutionStatistics -> Rep QueryExecutionStatistics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep QueryExecutionStatistics x -> QueryExecutionStatistics
$cfrom :: forall x.
QueryExecutionStatistics -> Rep QueryExecutionStatistics x
Prelude.Generic)
newQueryExecutionStatistics ::
QueryExecutionStatistics
newQueryExecutionStatistics :: QueryExecutionStatistics
newQueryExecutionStatistics =
QueryExecutionStatistics' :: Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> QueryExecutionStatistics
QueryExecutionStatistics'
{ $sel:totalExecutionTimeInMillis:QueryExecutionStatistics' :: Maybe Integer
totalExecutionTimeInMillis =
Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:engineExecutionTimeInMillis:QueryExecutionStatistics' :: Maybe Integer
engineExecutionTimeInMillis = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:queryPlanningTimeInMillis:QueryExecutionStatistics' :: Maybe Integer
queryPlanningTimeInMillis = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:dataScannedInBytes:QueryExecutionStatistics' :: Maybe Integer
dataScannedInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:queryQueueTimeInMillis:QueryExecutionStatistics' :: Maybe Integer
queryQueueTimeInMillis = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:dataManifestLocation:QueryExecutionStatistics' :: Maybe Text
dataManifestLocation = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serviceProcessingTimeInMillis:QueryExecutionStatistics' :: Maybe Integer
serviceProcessingTimeInMillis = Maybe Integer
forall a. Maybe a
Prelude.Nothing
}
queryExecutionStatistics_totalExecutionTimeInMillis :: Lens.Lens' QueryExecutionStatistics (Prelude.Maybe Prelude.Integer)
queryExecutionStatistics_totalExecutionTimeInMillis :: (Maybe Integer -> f (Maybe Integer))
-> QueryExecutionStatistics -> f QueryExecutionStatistics
queryExecutionStatistics_totalExecutionTimeInMillis = (QueryExecutionStatistics -> Maybe Integer)
-> (QueryExecutionStatistics
-> Maybe Integer -> QueryExecutionStatistics)
-> Lens
QueryExecutionStatistics
QueryExecutionStatistics
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QueryExecutionStatistics' {Maybe Integer
totalExecutionTimeInMillis :: Maybe Integer
$sel:totalExecutionTimeInMillis:QueryExecutionStatistics' :: QueryExecutionStatistics -> Maybe Integer
totalExecutionTimeInMillis} -> Maybe Integer
totalExecutionTimeInMillis) (\s :: QueryExecutionStatistics
s@QueryExecutionStatistics' {} Maybe Integer
a -> QueryExecutionStatistics
s {$sel:totalExecutionTimeInMillis:QueryExecutionStatistics' :: Maybe Integer
totalExecutionTimeInMillis = Maybe Integer
a} :: QueryExecutionStatistics)
queryExecutionStatistics_engineExecutionTimeInMillis :: Lens.Lens' QueryExecutionStatistics (Prelude.Maybe Prelude.Integer)
queryExecutionStatistics_engineExecutionTimeInMillis :: (Maybe Integer -> f (Maybe Integer))
-> QueryExecutionStatistics -> f QueryExecutionStatistics
queryExecutionStatistics_engineExecutionTimeInMillis = (QueryExecutionStatistics -> Maybe Integer)
-> (QueryExecutionStatistics
-> Maybe Integer -> QueryExecutionStatistics)
-> Lens
QueryExecutionStatistics
QueryExecutionStatistics
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QueryExecutionStatistics' {Maybe Integer
engineExecutionTimeInMillis :: Maybe Integer
$sel:engineExecutionTimeInMillis:QueryExecutionStatistics' :: QueryExecutionStatistics -> Maybe Integer
engineExecutionTimeInMillis} -> Maybe Integer
engineExecutionTimeInMillis) (\s :: QueryExecutionStatistics
s@QueryExecutionStatistics' {} Maybe Integer
a -> QueryExecutionStatistics
s {$sel:engineExecutionTimeInMillis:QueryExecutionStatistics' :: Maybe Integer
engineExecutionTimeInMillis = Maybe Integer
a} :: QueryExecutionStatistics)
queryExecutionStatistics_queryPlanningTimeInMillis :: Lens.Lens' QueryExecutionStatistics (Prelude.Maybe Prelude.Integer)
queryExecutionStatistics_queryPlanningTimeInMillis :: (Maybe Integer -> f (Maybe Integer))
-> QueryExecutionStatistics -> f QueryExecutionStatistics
queryExecutionStatistics_queryPlanningTimeInMillis = (QueryExecutionStatistics -> Maybe Integer)
-> (QueryExecutionStatistics
-> Maybe Integer -> QueryExecutionStatistics)
-> Lens
QueryExecutionStatistics
QueryExecutionStatistics
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QueryExecutionStatistics' {Maybe Integer
queryPlanningTimeInMillis :: Maybe Integer
$sel:queryPlanningTimeInMillis:QueryExecutionStatistics' :: QueryExecutionStatistics -> Maybe Integer
queryPlanningTimeInMillis} -> Maybe Integer
queryPlanningTimeInMillis) (\s :: QueryExecutionStatistics
s@QueryExecutionStatistics' {} Maybe Integer
a -> QueryExecutionStatistics
s {$sel:queryPlanningTimeInMillis:QueryExecutionStatistics' :: Maybe Integer
queryPlanningTimeInMillis = Maybe Integer
a} :: QueryExecutionStatistics)
queryExecutionStatistics_dataScannedInBytes :: Lens.Lens' QueryExecutionStatistics (Prelude.Maybe Prelude.Integer)
queryExecutionStatistics_dataScannedInBytes :: (Maybe Integer -> f (Maybe Integer))
-> QueryExecutionStatistics -> f QueryExecutionStatistics
queryExecutionStatistics_dataScannedInBytes = (QueryExecutionStatistics -> Maybe Integer)
-> (QueryExecutionStatistics
-> Maybe Integer -> QueryExecutionStatistics)
-> Lens
QueryExecutionStatistics
QueryExecutionStatistics
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QueryExecutionStatistics' {Maybe Integer
dataScannedInBytes :: Maybe Integer
$sel:dataScannedInBytes:QueryExecutionStatistics' :: QueryExecutionStatistics -> Maybe Integer
dataScannedInBytes} -> Maybe Integer
dataScannedInBytes) (\s :: QueryExecutionStatistics
s@QueryExecutionStatistics' {} Maybe Integer
a -> QueryExecutionStatistics
s {$sel:dataScannedInBytes:QueryExecutionStatistics' :: Maybe Integer
dataScannedInBytes = Maybe Integer
a} :: QueryExecutionStatistics)
queryExecutionStatistics_queryQueueTimeInMillis :: Lens.Lens' QueryExecutionStatistics (Prelude.Maybe Prelude.Integer)
queryExecutionStatistics_queryQueueTimeInMillis :: (Maybe Integer -> f (Maybe Integer))
-> QueryExecutionStatistics -> f QueryExecutionStatistics
queryExecutionStatistics_queryQueueTimeInMillis = (QueryExecutionStatistics -> Maybe Integer)
-> (QueryExecutionStatistics
-> Maybe Integer -> QueryExecutionStatistics)
-> Lens
QueryExecutionStatistics
QueryExecutionStatistics
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QueryExecutionStatistics' {Maybe Integer
queryQueueTimeInMillis :: Maybe Integer
$sel:queryQueueTimeInMillis:QueryExecutionStatistics' :: QueryExecutionStatistics -> Maybe Integer
queryQueueTimeInMillis} -> Maybe Integer
queryQueueTimeInMillis) (\s :: QueryExecutionStatistics
s@QueryExecutionStatistics' {} Maybe Integer
a -> QueryExecutionStatistics
s {$sel:queryQueueTimeInMillis:QueryExecutionStatistics' :: Maybe Integer
queryQueueTimeInMillis = Maybe Integer
a} :: QueryExecutionStatistics)
queryExecutionStatistics_dataManifestLocation :: Lens.Lens' QueryExecutionStatistics (Prelude.Maybe Prelude.Text)
queryExecutionStatistics_dataManifestLocation :: (Maybe Text -> f (Maybe Text))
-> QueryExecutionStatistics -> f QueryExecutionStatistics
queryExecutionStatistics_dataManifestLocation = (QueryExecutionStatistics -> Maybe Text)
-> (QueryExecutionStatistics
-> Maybe Text -> QueryExecutionStatistics)
-> Lens
QueryExecutionStatistics
QueryExecutionStatistics
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QueryExecutionStatistics' {Maybe Text
dataManifestLocation :: Maybe Text
$sel:dataManifestLocation:QueryExecutionStatistics' :: QueryExecutionStatistics -> Maybe Text
dataManifestLocation} -> Maybe Text
dataManifestLocation) (\s :: QueryExecutionStatistics
s@QueryExecutionStatistics' {} Maybe Text
a -> QueryExecutionStatistics
s {$sel:dataManifestLocation:QueryExecutionStatistics' :: Maybe Text
dataManifestLocation = Maybe Text
a} :: QueryExecutionStatistics)
queryExecutionStatistics_serviceProcessingTimeInMillis :: Lens.Lens' QueryExecutionStatistics (Prelude.Maybe Prelude.Integer)
queryExecutionStatistics_serviceProcessingTimeInMillis :: (Maybe Integer -> f (Maybe Integer))
-> QueryExecutionStatistics -> f QueryExecutionStatistics
queryExecutionStatistics_serviceProcessingTimeInMillis = (QueryExecutionStatistics -> Maybe Integer)
-> (QueryExecutionStatistics
-> Maybe Integer -> QueryExecutionStatistics)
-> Lens
QueryExecutionStatistics
QueryExecutionStatistics
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QueryExecutionStatistics' {Maybe Integer
serviceProcessingTimeInMillis :: Maybe Integer
$sel:serviceProcessingTimeInMillis:QueryExecutionStatistics' :: QueryExecutionStatistics -> Maybe Integer
serviceProcessingTimeInMillis} -> Maybe Integer
serviceProcessingTimeInMillis) (\s :: QueryExecutionStatistics
s@QueryExecutionStatistics' {} Maybe Integer
a -> QueryExecutionStatistics
s {$sel:serviceProcessingTimeInMillis:QueryExecutionStatistics' :: Maybe Integer
serviceProcessingTimeInMillis = Maybe Integer
a} :: QueryExecutionStatistics)
instance Core.FromJSON QueryExecutionStatistics where
parseJSON :: Value -> Parser QueryExecutionStatistics
parseJSON =
String
-> (Object -> Parser QueryExecutionStatistics)
-> Value
-> Parser QueryExecutionStatistics
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"QueryExecutionStatistics"
( \Object
x ->
Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> QueryExecutionStatistics
QueryExecutionStatistics'
(Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> QueryExecutionStatistics)
-> Parser (Maybe Integer)
-> Parser
(Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> QueryExecutionStatistics)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TotalExecutionTimeInMillis")
Parser
(Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> QueryExecutionStatistics)
-> Parser (Maybe Integer)
-> Parser
(Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> QueryExecutionStatistics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EngineExecutionTimeInMillis")
Parser
(Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> QueryExecutionStatistics)
-> Parser (Maybe Integer)
-> Parser
(Maybe Integer
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> QueryExecutionStatistics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"QueryPlanningTimeInMillis")
Parser
(Maybe Integer
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> QueryExecutionStatistics)
-> Parser (Maybe Integer)
-> Parser
(Maybe Integer
-> Maybe Text -> Maybe Integer -> QueryExecutionStatistics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DataScannedInBytes")
Parser
(Maybe Integer
-> Maybe Text -> Maybe Integer -> QueryExecutionStatistics)
-> Parser (Maybe Integer)
-> Parser (Maybe Text -> Maybe Integer -> QueryExecutionStatistics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"QueryQueueTimeInMillis")
Parser (Maybe Text -> Maybe Integer -> QueryExecutionStatistics)
-> Parser (Maybe Text)
-> Parser (Maybe Integer -> QueryExecutionStatistics)
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
"DataManifestLocation")
Parser (Maybe Integer -> QueryExecutionStatistics)
-> Parser (Maybe Integer) -> Parser QueryExecutionStatistics
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServiceProcessingTimeInMillis")
)
instance Prelude.Hashable QueryExecutionStatistics
instance Prelude.NFData QueryExecutionStatistics