{-# 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.ResponseTimeRootCause 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
import Amazonka.XRay.Types.ResponseTimeRootCauseService
data ResponseTimeRootCause = ResponseTimeRootCause'
{
ResponseTimeRootCause -> Maybe Bool
clientImpacting :: Prelude.Maybe Prelude.Bool,
ResponseTimeRootCause -> Maybe [ResponseTimeRootCauseService]
services :: Prelude.Maybe [ResponseTimeRootCauseService]
}
deriving (ResponseTimeRootCause -> ResponseTimeRootCause -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResponseTimeRootCause -> ResponseTimeRootCause -> Bool
$c/= :: ResponseTimeRootCause -> ResponseTimeRootCause -> Bool
== :: ResponseTimeRootCause -> ResponseTimeRootCause -> Bool
$c== :: ResponseTimeRootCause -> ResponseTimeRootCause -> Bool
Prelude.Eq, ReadPrec [ResponseTimeRootCause]
ReadPrec ResponseTimeRootCause
Int -> ReadS ResponseTimeRootCause
ReadS [ResponseTimeRootCause]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResponseTimeRootCause]
$creadListPrec :: ReadPrec [ResponseTimeRootCause]
readPrec :: ReadPrec ResponseTimeRootCause
$creadPrec :: ReadPrec ResponseTimeRootCause
readList :: ReadS [ResponseTimeRootCause]
$creadList :: ReadS [ResponseTimeRootCause]
readsPrec :: Int -> ReadS ResponseTimeRootCause
$creadsPrec :: Int -> ReadS ResponseTimeRootCause
Prelude.Read, Int -> ResponseTimeRootCause -> ShowS
[ResponseTimeRootCause] -> ShowS
ResponseTimeRootCause -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResponseTimeRootCause] -> ShowS
$cshowList :: [ResponseTimeRootCause] -> ShowS
show :: ResponseTimeRootCause -> String
$cshow :: ResponseTimeRootCause -> String
showsPrec :: Int -> ResponseTimeRootCause -> ShowS
$cshowsPrec :: Int -> ResponseTimeRootCause -> ShowS
Prelude.Show, forall x. Rep ResponseTimeRootCause x -> ResponseTimeRootCause
forall x. ResponseTimeRootCause -> Rep ResponseTimeRootCause x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResponseTimeRootCause x -> ResponseTimeRootCause
$cfrom :: forall x. ResponseTimeRootCause -> Rep ResponseTimeRootCause x
Prelude.Generic)
newResponseTimeRootCause ::
ResponseTimeRootCause
newResponseTimeRootCause :: ResponseTimeRootCause
newResponseTimeRootCause =
ResponseTimeRootCause'
{ $sel:clientImpacting:ResponseTimeRootCause' :: Maybe Bool
clientImpacting =
forall a. Maybe a
Prelude.Nothing,
$sel:services:ResponseTimeRootCause' :: Maybe [ResponseTimeRootCauseService]
services = forall a. Maybe a
Prelude.Nothing
}
responseTimeRootCause_clientImpacting :: Lens.Lens' ResponseTimeRootCause (Prelude.Maybe Prelude.Bool)
responseTimeRootCause_clientImpacting :: Lens' ResponseTimeRootCause (Maybe Bool)
responseTimeRootCause_clientImpacting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResponseTimeRootCause' {Maybe Bool
clientImpacting :: Maybe Bool
$sel:clientImpacting:ResponseTimeRootCause' :: ResponseTimeRootCause -> Maybe Bool
clientImpacting} -> Maybe Bool
clientImpacting) (\s :: ResponseTimeRootCause
s@ResponseTimeRootCause' {} Maybe Bool
a -> ResponseTimeRootCause
s {$sel:clientImpacting:ResponseTimeRootCause' :: Maybe Bool
clientImpacting = Maybe Bool
a} :: ResponseTimeRootCause)
responseTimeRootCause_services :: Lens.Lens' ResponseTimeRootCause (Prelude.Maybe [ResponseTimeRootCauseService])
responseTimeRootCause_services :: Lens' ResponseTimeRootCause (Maybe [ResponseTimeRootCauseService])
responseTimeRootCause_services = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResponseTimeRootCause' {Maybe [ResponseTimeRootCauseService]
services :: Maybe [ResponseTimeRootCauseService]
$sel:services:ResponseTimeRootCause' :: ResponseTimeRootCause -> Maybe [ResponseTimeRootCauseService]
services} -> Maybe [ResponseTimeRootCauseService]
services) (\s :: ResponseTimeRootCause
s@ResponseTimeRootCause' {} Maybe [ResponseTimeRootCauseService]
a -> ResponseTimeRootCause
s {$sel:services:ResponseTimeRootCause' :: Maybe [ResponseTimeRootCauseService]
services = Maybe [ResponseTimeRootCauseService]
a} :: ResponseTimeRootCause) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON ResponseTimeRootCause where
parseJSON :: Value -> Parser ResponseTimeRootCause
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ResponseTimeRootCause"
( \Object
x ->
Maybe Bool
-> Maybe [ResponseTimeRootCauseService] -> ResponseTimeRootCause
ResponseTimeRootCause'
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
"ClientImpacting")
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
"Services" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable ResponseTimeRootCause where
hashWithSalt :: Int -> ResponseTimeRootCause -> Int
hashWithSalt Int
_salt ResponseTimeRootCause' {Maybe Bool
Maybe [ResponseTimeRootCauseService]
services :: Maybe [ResponseTimeRootCauseService]
clientImpacting :: Maybe Bool
$sel:services:ResponseTimeRootCause' :: ResponseTimeRootCause -> Maybe [ResponseTimeRootCauseService]
$sel:clientImpacting:ResponseTimeRootCause' :: ResponseTimeRootCause -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
clientImpacting
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ResponseTimeRootCauseService]
services
instance Prelude.NFData ResponseTimeRootCause where
rnf :: ResponseTimeRootCause -> ()
rnf ResponseTimeRootCause' {Maybe Bool
Maybe [ResponseTimeRootCauseService]
services :: Maybe [ResponseTimeRootCauseService]
clientImpacting :: Maybe Bool
$sel:services:ResponseTimeRootCause' :: ResponseTimeRootCause -> Maybe [ResponseTimeRootCauseService]
$sel:clientImpacting:ResponseTimeRootCause' :: ResponseTimeRootCause -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
clientImpacting
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ResponseTimeRootCauseService]
services