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