{-# 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.XRay.Types.RequestImpactStatistics where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data RequestImpactStatistics = RequestImpactStatistics'
{
RequestImpactStatistics -> Maybe Integer
faultCount :: Prelude.Maybe Prelude.Integer,
RequestImpactStatistics -> Maybe Integer
okCount :: Prelude.Maybe Prelude.Integer,
RequestImpactStatistics -> Maybe Integer
totalCount :: Prelude.Maybe Prelude.Integer
}
deriving (RequestImpactStatistics -> RequestImpactStatistics -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestImpactStatistics -> RequestImpactStatistics -> Bool
$c/= :: RequestImpactStatistics -> RequestImpactStatistics -> Bool
== :: RequestImpactStatistics -> RequestImpactStatistics -> Bool
$c== :: RequestImpactStatistics -> RequestImpactStatistics -> Bool
Prelude.Eq, ReadPrec [RequestImpactStatistics]
ReadPrec RequestImpactStatistics
Int -> ReadS RequestImpactStatistics
ReadS [RequestImpactStatistics]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RequestImpactStatistics]
$creadListPrec :: ReadPrec [RequestImpactStatistics]
readPrec :: ReadPrec RequestImpactStatistics
$creadPrec :: ReadPrec RequestImpactStatistics
readList :: ReadS [RequestImpactStatistics]
$creadList :: ReadS [RequestImpactStatistics]
readsPrec :: Int -> ReadS RequestImpactStatistics
$creadsPrec :: Int -> ReadS RequestImpactStatistics
Prelude.Read, Int -> RequestImpactStatistics -> ShowS
[RequestImpactStatistics] -> ShowS
RequestImpactStatistics -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RequestImpactStatistics] -> ShowS
$cshowList :: [RequestImpactStatistics] -> ShowS
show :: RequestImpactStatistics -> String
$cshow :: RequestImpactStatistics -> String
showsPrec :: Int -> RequestImpactStatistics -> ShowS
$cshowsPrec :: Int -> RequestImpactStatistics -> ShowS
Prelude.Show, forall x. Rep RequestImpactStatistics x -> RequestImpactStatistics
forall x. RequestImpactStatistics -> Rep RequestImpactStatistics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RequestImpactStatistics x -> RequestImpactStatistics
$cfrom :: forall x. RequestImpactStatistics -> Rep RequestImpactStatistics x
Prelude.Generic)
newRequestImpactStatistics ::
RequestImpactStatistics
newRequestImpactStatistics :: RequestImpactStatistics
newRequestImpactStatistics =
RequestImpactStatistics'
{ $sel:faultCount:RequestImpactStatistics' :: Maybe Integer
faultCount =
forall a. Maybe a
Prelude.Nothing,
$sel:okCount:RequestImpactStatistics' :: Maybe Integer
okCount = forall a. Maybe a
Prelude.Nothing,
$sel:totalCount:RequestImpactStatistics' :: Maybe Integer
totalCount = forall a. Maybe a
Prelude.Nothing
}
requestImpactStatistics_faultCount :: Lens.Lens' RequestImpactStatistics (Prelude.Maybe Prelude.Integer)
requestImpactStatistics_faultCount :: Lens' RequestImpactStatistics (Maybe Integer)
requestImpactStatistics_faultCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestImpactStatistics' {Maybe Integer
faultCount :: Maybe Integer
$sel:faultCount:RequestImpactStatistics' :: RequestImpactStatistics -> Maybe Integer
faultCount} -> Maybe Integer
faultCount) (\s :: RequestImpactStatistics
s@RequestImpactStatistics' {} Maybe Integer
a -> RequestImpactStatistics
s {$sel:faultCount:RequestImpactStatistics' :: Maybe Integer
faultCount = Maybe Integer
a} :: RequestImpactStatistics)
requestImpactStatistics_okCount :: Lens.Lens' RequestImpactStatistics (Prelude.Maybe Prelude.Integer)
requestImpactStatistics_okCount :: Lens' RequestImpactStatistics (Maybe Integer)
requestImpactStatistics_okCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestImpactStatistics' {Maybe Integer
okCount :: Maybe Integer
$sel:okCount:RequestImpactStatistics' :: RequestImpactStatistics -> Maybe Integer
okCount} -> Maybe Integer
okCount) (\s :: RequestImpactStatistics
s@RequestImpactStatistics' {} Maybe Integer
a -> RequestImpactStatistics
s {$sel:okCount:RequestImpactStatistics' :: Maybe Integer
okCount = Maybe Integer
a} :: RequestImpactStatistics)
requestImpactStatistics_totalCount :: Lens.Lens' RequestImpactStatistics (Prelude.Maybe Prelude.Integer)
requestImpactStatistics_totalCount :: Lens' RequestImpactStatistics (Maybe Integer)
requestImpactStatistics_totalCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestImpactStatistics' {Maybe Integer
totalCount :: Maybe Integer
$sel:totalCount:RequestImpactStatistics' :: RequestImpactStatistics -> Maybe Integer
totalCount} -> Maybe Integer
totalCount) (\s :: RequestImpactStatistics
s@RequestImpactStatistics' {} Maybe Integer
a -> RequestImpactStatistics
s {$sel:totalCount:RequestImpactStatistics' :: Maybe Integer
totalCount = Maybe Integer
a} :: RequestImpactStatistics)
instance Data.FromJSON RequestImpactStatistics where
parseJSON :: Value -> Parser RequestImpactStatistics
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"RequestImpactStatistics"
( \Object
x ->
Maybe Integer
-> Maybe Integer -> Maybe Integer -> RequestImpactStatistics
RequestImpactStatistics'
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
"FaultCount")
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
"OkCount")
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
"TotalCount")
)
instance Prelude.Hashable RequestImpactStatistics where
hashWithSalt :: Int -> RequestImpactStatistics -> Int
hashWithSalt Int
_salt RequestImpactStatistics' {Maybe Integer
totalCount :: Maybe Integer
okCount :: Maybe Integer
faultCount :: Maybe Integer
$sel:totalCount:RequestImpactStatistics' :: RequestImpactStatistics -> Maybe Integer
$sel:okCount:RequestImpactStatistics' :: RequestImpactStatistics -> Maybe Integer
$sel:faultCount:RequestImpactStatistics' :: RequestImpactStatistics -> Maybe Integer
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
faultCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
okCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
totalCount
instance Prelude.NFData RequestImpactStatistics where
rnf :: RequestImpactStatistics -> ()
rnf RequestImpactStatistics' {Maybe Integer
totalCount :: Maybe Integer
okCount :: Maybe Integer
faultCount :: Maybe Integer
$sel:totalCount:RequestImpactStatistics' :: RequestImpactStatistics -> Maybe Integer
$sel:okCount:RequestImpactStatistics' :: RequestImpactStatistics -> Maybe Integer
$sel:faultCount:RequestImpactStatistics' :: RequestImpactStatistics -> Maybe Integer
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
faultCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
okCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
totalCount