{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RequestImpactStatistics = RequestImpactStatistics'
{
RequestImpactStatistics -> Maybe Integer
okCount :: Prelude.Maybe Prelude.Integer,
RequestImpactStatistics -> Maybe Integer
faultCount :: Prelude.Maybe Prelude.Integer,
RequestImpactStatistics -> Maybe Integer
totalCount :: Prelude.Maybe Prelude.Integer
}
deriving (RequestImpactStatistics -> RequestImpactStatistics -> Bool
(RequestImpactStatistics -> RequestImpactStatistics -> Bool)
-> (RequestImpactStatistics -> RequestImpactStatistics -> Bool)
-> Eq RequestImpactStatistics
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]
(Int -> ReadS RequestImpactStatistics)
-> ReadS [RequestImpactStatistics]
-> ReadPrec RequestImpactStatistics
-> ReadPrec [RequestImpactStatistics]
-> Read 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
(Int -> RequestImpactStatistics -> ShowS)
-> (RequestImpactStatistics -> String)
-> ([RequestImpactStatistics] -> ShowS)
-> Show RequestImpactStatistics
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.
RequestImpactStatistics -> Rep RequestImpactStatistics x)
-> (forall x.
Rep RequestImpactStatistics x -> RequestImpactStatistics)
-> Generic RequestImpactStatistics
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' :: Maybe Integer
-> Maybe Integer -> Maybe Integer -> RequestImpactStatistics
RequestImpactStatistics'
{ $sel:okCount:RequestImpactStatistics' :: Maybe Integer
okCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:faultCount:RequestImpactStatistics' :: Maybe Integer
faultCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:totalCount:RequestImpactStatistics' :: Maybe Integer
totalCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing
}
requestImpactStatistics_okCount :: Lens.Lens' RequestImpactStatistics (Prelude.Maybe Prelude.Integer)
requestImpactStatistics_okCount :: (Maybe Integer -> f (Maybe Integer))
-> RequestImpactStatistics -> f RequestImpactStatistics
requestImpactStatistics_okCount = (RequestImpactStatistics -> Maybe Integer)
-> (RequestImpactStatistics
-> Maybe Integer -> RequestImpactStatistics)
-> Lens
RequestImpactStatistics
RequestImpactStatistics
(Maybe Integer)
(Maybe Integer)
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_faultCount :: Lens.Lens' RequestImpactStatistics (Prelude.Maybe Prelude.Integer)
requestImpactStatistics_faultCount :: (Maybe Integer -> f (Maybe Integer))
-> RequestImpactStatistics -> f RequestImpactStatistics
requestImpactStatistics_faultCount = (RequestImpactStatistics -> Maybe Integer)
-> (RequestImpactStatistics
-> Maybe Integer -> RequestImpactStatistics)
-> Lens
RequestImpactStatistics
RequestImpactStatistics
(Maybe Integer)
(Maybe Integer)
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_totalCount :: Lens.Lens' RequestImpactStatistics (Prelude.Maybe Prelude.Integer)
requestImpactStatistics_totalCount :: (Maybe Integer -> f (Maybe Integer))
-> RequestImpactStatistics -> f RequestImpactStatistics
requestImpactStatistics_totalCount = (RequestImpactStatistics -> Maybe Integer)
-> (RequestImpactStatistics
-> Maybe Integer -> RequestImpactStatistics)
-> Lens
RequestImpactStatistics
RequestImpactStatistics
(Maybe Integer)
(Maybe Integer)
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 Core.FromJSON RequestImpactStatistics where
parseJSON :: Value -> Parser RequestImpactStatistics
parseJSON =
String
-> (Object -> Parser RequestImpactStatistics)
-> Value
-> Parser RequestImpactStatistics
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RequestImpactStatistics"
( \Object
x ->
Maybe Integer
-> Maybe Integer -> Maybe Integer -> RequestImpactStatistics
RequestImpactStatistics'
(Maybe Integer
-> Maybe Integer -> Maybe Integer -> RequestImpactStatistics)
-> Parser (Maybe Integer)
-> Parser
(Maybe Integer -> Maybe Integer -> RequestImpactStatistics)
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
"OkCount")
Parser (Maybe Integer -> Maybe Integer -> RequestImpactStatistics)
-> Parser (Maybe Integer)
-> Parser (Maybe Integer -> RequestImpactStatistics)
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
"FaultCount")
Parser (Maybe Integer -> RequestImpactStatistics)
-> Parser (Maybe Integer) -> Parser RequestImpactStatistics
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
"TotalCount")
)
instance Prelude.Hashable RequestImpactStatistics
instance Prelude.NFData RequestImpactStatistics