{-# 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.CloudWatchLogs.Types.QueryStatistics where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data QueryStatistics = QueryStatistics'
{
QueryStatistics -> Maybe Double
recordsScanned :: Prelude.Maybe Prelude.Double,
QueryStatistics -> Maybe Double
bytesScanned :: Prelude.Maybe Prelude.Double,
QueryStatistics -> Maybe Double
recordsMatched :: Prelude.Maybe Prelude.Double
}
deriving (QueryStatistics -> QueryStatistics -> Bool
(QueryStatistics -> QueryStatistics -> Bool)
-> (QueryStatistics -> QueryStatistics -> Bool)
-> Eq QueryStatistics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: QueryStatistics -> QueryStatistics -> Bool
$c/= :: QueryStatistics -> QueryStatistics -> Bool
== :: QueryStatistics -> QueryStatistics -> Bool
$c== :: QueryStatistics -> QueryStatistics -> Bool
Prelude.Eq, ReadPrec [QueryStatistics]
ReadPrec QueryStatistics
Int -> ReadS QueryStatistics
ReadS [QueryStatistics]
(Int -> ReadS QueryStatistics)
-> ReadS [QueryStatistics]
-> ReadPrec QueryStatistics
-> ReadPrec [QueryStatistics]
-> Read QueryStatistics
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [QueryStatistics]
$creadListPrec :: ReadPrec [QueryStatistics]
readPrec :: ReadPrec QueryStatistics
$creadPrec :: ReadPrec QueryStatistics
readList :: ReadS [QueryStatistics]
$creadList :: ReadS [QueryStatistics]
readsPrec :: Int -> ReadS QueryStatistics
$creadsPrec :: Int -> ReadS QueryStatistics
Prelude.Read, Int -> QueryStatistics -> ShowS
[QueryStatistics] -> ShowS
QueryStatistics -> String
(Int -> QueryStatistics -> ShowS)
-> (QueryStatistics -> String)
-> ([QueryStatistics] -> ShowS)
-> Show QueryStatistics
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [QueryStatistics] -> ShowS
$cshowList :: [QueryStatistics] -> ShowS
show :: QueryStatistics -> String
$cshow :: QueryStatistics -> String
showsPrec :: Int -> QueryStatistics -> ShowS
$cshowsPrec :: Int -> QueryStatistics -> ShowS
Prelude.Show, (forall x. QueryStatistics -> Rep QueryStatistics x)
-> (forall x. Rep QueryStatistics x -> QueryStatistics)
-> Generic QueryStatistics
forall x. Rep QueryStatistics x -> QueryStatistics
forall x. QueryStatistics -> Rep QueryStatistics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep QueryStatistics x -> QueryStatistics
$cfrom :: forall x. QueryStatistics -> Rep QueryStatistics x
Prelude.Generic)
newQueryStatistics ::
QueryStatistics
newQueryStatistics :: QueryStatistics
newQueryStatistics =
QueryStatistics' :: Maybe Double -> Maybe Double -> Maybe Double -> QueryStatistics
QueryStatistics'
{ $sel:recordsScanned:QueryStatistics' :: Maybe Double
recordsScanned = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:bytesScanned:QueryStatistics' :: Maybe Double
bytesScanned = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:recordsMatched:QueryStatistics' :: Maybe Double
recordsMatched = Maybe Double
forall a. Maybe a
Prelude.Nothing
}
queryStatistics_recordsScanned :: Lens.Lens' QueryStatistics (Prelude.Maybe Prelude.Double)
queryStatistics_recordsScanned :: (Maybe Double -> f (Maybe Double))
-> QueryStatistics -> f QueryStatistics
queryStatistics_recordsScanned = (QueryStatistics -> Maybe Double)
-> (QueryStatistics -> Maybe Double -> QueryStatistics)
-> Lens
QueryStatistics QueryStatistics (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QueryStatistics' {Maybe Double
recordsScanned :: Maybe Double
$sel:recordsScanned:QueryStatistics' :: QueryStatistics -> Maybe Double
recordsScanned} -> Maybe Double
recordsScanned) (\s :: QueryStatistics
s@QueryStatistics' {} Maybe Double
a -> QueryStatistics
s {$sel:recordsScanned:QueryStatistics' :: Maybe Double
recordsScanned = Maybe Double
a} :: QueryStatistics)
queryStatistics_bytesScanned :: Lens.Lens' QueryStatistics (Prelude.Maybe Prelude.Double)
queryStatistics_bytesScanned :: (Maybe Double -> f (Maybe Double))
-> QueryStatistics -> f QueryStatistics
queryStatistics_bytesScanned = (QueryStatistics -> Maybe Double)
-> (QueryStatistics -> Maybe Double -> QueryStatistics)
-> Lens
QueryStatistics QueryStatistics (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QueryStatistics' {Maybe Double
bytesScanned :: Maybe Double
$sel:bytesScanned:QueryStatistics' :: QueryStatistics -> Maybe Double
bytesScanned} -> Maybe Double
bytesScanned) (\s :: QueryStatistics
s@QueryStatistics' {} Maybe Double
a -> QueryStatistics
s {$sel:bytesScanned:QueryStatistics' :: Maybe Double
bytesScanned = Maybe Double
a} :: QueryStatistics)
queryStatistics_recordsMatched :: Lens.Lens' QueryStatistics (Prelude.Maybe Prelude.Double)
queryStatistics_recordsMatched :: (Maybe Double -> f (Maybe Double))
-> QueryStatistics -> f QueryStatistics
queryStatistics_recordsMatched = (QueryStatistics -> Maybe Double)
-> (QueryStatistics -> Maybe Double -> QueryStatistics)
-> Lens
QueryStatistics QueryStatistics (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QueryStatistics' {Maybe Double
recordsMatched :: Maybe Double
$sel:recordsMatched:QueryStatistics' :: QueryStatistics -> Maybe Double
recordsMatched} -> Maybe Double
recordsMatched) (\s :: QueryStatistics
s@QueryStatistics' {} Maybe Double
a -> QueryStatistics
s {$sel:recordsMatched:QueryStatistics' :: Maybe Double
recordsMatched = Maybe Double
a} :: QueryStatistics)
instance Core.FromJSON QueryStatistics where
parseJSON :: Value -> Parser QueryStatistics
parseJSON =
String
-> (Object -> Parser QueryStatistics)
-> Value
-> Parser QueryStatistics
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"QueryStatistics"
( \Object
x ->
Maybe Double -> Maybe Double -> Maybe Double -> QueryStatistics
QueryStatistics'
(Maybe Double -> Maybe Double -> Maybe Double -> QueryStatistics)
-> Parser (Maybe Double)
-> Parser (Maybe Double -> Maybe Double -> QueryStatistics)
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
"recordsScanned")
Parser (Maybe Double -> Maybe Double -> QueryStatistics)
-> Parser (Maybe Double)
-> Parser (Maybe Double -> QueryStatistics)
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
"bytesScanned")
Parser (Maybe Double -> QueryStatistics)
-> Parser (Maybe Double) -> Parser QueryStatistics
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
"recordsMatched")
)
instance Prelude.Hashable QueryStatistics
instance Prelude.NFData QueryStatistics