{-# 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.FaultStatistics 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 FaultStatistics = FaultStatistics'
{
FaultStatistics -> Maybe Integer
otherCount :: Prelude.Maybe Prelude.Integer,
FaultStatistics -> Maybe Integer
totalCount :: Prelude.Maybe Prelude.Integer
}
deriving (FaultStatistics -> FaultStatistics -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FaultStatistics -> FaultStatistics -> Bool
$c/= :: FaultStatistics -> FaultStatistics -> Bool
== :: FaultStatistics -> FaultStatistics -> Bool
$c== :: FaultStatistics -> FaultStatistics -> Bool
Prelude.Eq, ReadPrec [FaultStatistics]
ReadPrec FaultStatistics
Int -> ReadS FaultStatistics
ReadS [FaultStatistics]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FaultStatistics]
$creadListPrec :: ReadPrec [FaultStatistics]
readPrec :: ReadPrec FaultStatistics
$creadPrec :: ReadPrec FaultStatistics
readList :: ReadS [FaultStatistics]
$creadList :: ReadS [FaultStatistics]
readsPrec :: Int -> ReadS FaultStatistics
$creadsPrec :: Int -> ReadS FaultStatistics
Prelude.Read, Int -> FaultStatistics -> ShowS
[FaultStatistics] -> ShowS
FaultStatistics -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FaultStatistics] -> ShowS
$cshowList :: [FaultStatistics] -> ShowS
show :: FaultStatistics -> String
$cshow :: FaultStatistics -> String
showsPrec :: Int -> FaultStatistics -> ShowS
$cshowsPrec :: Int -> FaultStatistics -> ShowS
Prelude.Show, forall x. Rep FaultStatistics x -> FaultStatistics
forall x. FaultStatistics -> Rep FaultStatistics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FaultStatistics x -> FaultStatistics
$cfrom :: forall x. FaultStatistics -> Rep FaultStatistics x
Prelude.Generic)
newFaultStatistics ::
FaultStatistics
newFaultStatistics :: FaultStatistics
newFaultStatistics =
FaultStatistics'
{ $sel:otherCount:FaultStatistics' :: Maybe Integer
otherCount = forall a. Maybe a
Prelude.Nothing,
$sel:totalCount:FaultStatistics' :: Maybe Integer
totalCount = forall a. Maybe a
Prelude.Nothing
}
faultStatistics_otherCount :: Lens.Lens' FaultStatistics (Prelude.Maybe Prelude.Integer)
faultStatistics_otherCount :: Lens' FaultStatistics (Maybe Integer)
faultStatistics_otherCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FaultStatistics' {Maybe Integer
otherCount :: Maybe Integer
$sel:otherCount:FaultStatistics' :: FaultStatistics -> Maybe Integer
otherCount} -> Maybe Integer
otherCount) (\s :: FaultStatistics
s@FaultStatistics' {} Maybe Integer
a -> FaultStatistics
s {$sel:otherCount:FaultStatistics' :: Maybe Integer
otherCount = Maybe Integer
a} :: FaultStatistics)
faultStatistics_totalCount :: Lens.Lens' FaultStatistics (Prelude.Maybe Prelude.Integer)
faultStatistics_totalCount :: Lens' FaultStatistics (Maybe Integer)
faultStatistics_totalCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FaultStatistics' {Maybe Integer
totalCount :: Maybe Integer
$sel:totalCount:FaultStatistics' :: FaultStatistics -> Maybe Integer
totalCount} -> Maybe Integer
totalCount) (\s :: FaultStatistics
s@FaultStatistics' {} Maybe Integer
a -> FaultStatistics
s {$sel:totalCount:FaultStatistics' :: Maybe Integer
totalCount = Maybe Integer
a} :: FaultStatistics)
instance Data.FromJSON FaultStatistics where
parseJSON :: Value -> Parser FaultStatistics
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"FaultStatistics"
( \Object
x ->
Maybe Integer -> Maybe Integer -> FaultStatistics
FaultStatistics'
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
"OtherCount")
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 FaultStatistics where
hashWithSalt :: Int -> FaultStatistics -> Int
hashWithSalt Int
_salt FaultStatistics' {Maybe Integer
totalCount :: Maybe Integer
otherCount :: Maybe Integer
$sel:totalCount:FaultStatistics' :: FaultStatistics -> Maybe Integer
$sel:otherCount:FaultStatistics' :: FaultStatistics -> Maybe Integer
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
otherCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
totalCount
instance Prelude.NFData FaultStatistics where
rnf :: FaultStatistics -> ()
rnf FaultStatistics' {Maybe Integer
totalCount :: Maybe Integer
otherCount :: Maybe Integer
$sel:totalCount:FaultStatistics' :: FaultStatistics -> Maybe Integer
$sel:otherCount:FaultStatistics' :: FaultStatistics -> Maybe Integer
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
otherCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
totalCount