{-# 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.Lens as Lens
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
(ResponseTimeRootCause -> ResponseTimeRootCause -> Bool)
-> (ResponseTimeRootCause -> ResponseTimeRootCause -> Bool)
-> Eq ResponseTimeRootCause
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]
(Int -> ReadS ResponseTimeRootCause)
-> ReadS [ResponseTimeRootCause]
-> ReadPrec ResponseTimeRootCause
-> ReadPrec [ResponseTimeRootCause]
-> Read 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
(Int -> ResponseTimeRootCause -> ShowS)
-> (ResponseTimeRootCause -> String)
-> ([ResponseTimeRootCause] -> ShowS)
-> Show ResponseTimeRootCause
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. ResponseTimeRootCause -> Rep ResponseTimeRootCause x)
-> (forall x. Rep ResponseTimeRootCause x -> ResponseTimeRootCause)
-> Generic ResponseTimeRootCause
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' :: Maybe Bool
-> Maybe [ResponseTimeRootCauseService] -> ResponseTimeRootCause
ResponseTimeRootCause'
{ $sel:clientImpacting:ResponseTimeRootCause' :: Maybe Bool
clientImpacting =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:services:ResponseTimeRootCause' :: Maybe [ResponseTimeRootCauseService]
services = Maybe [ResponseTimeRootCauseService]
forall a. Maybe a
Prelude.Nothing
}
responseTimeRootCause_clientImpacting :: Lens.Lens' ResponseTimeRootCause (Prelude.Maybe Prelude.Bool)
responseTimeRootCause_clientImpacting :: (Maybe Bool -> f (Maybe Bool))
-> ResponseTimeRootCause -> f ResponseTimeRootCause
responseTimeRootCause_clientImpacting = (ResponseTimeRootCause -> Maybe Bool)
-> (ResponseTimeRootCause -> Maybe Bool -> ResponseTimeRootCause)
-> Lens
ResponseTimeRootCause
ResponseTimeRootCause
(Maybe Bool)
(Maybe Bool)
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 :: (Maybe [ResponseTimeRootCauseService]
-> f (Maybe [ResponseTimeRootCauseService]))
-> ResponseTimeRootCause -> f ResponseTimeRootCause
responseTimeRootCause_services = (ResponseTimeRootCause -> Maybe [ResponseTimeRootCauseService])
-> (ResponseTimeRootCause
-> Maybe [ResponseTimeRootCauseService] -> ResponseTimeRootCause)
-> Lens
ResponseTimeRootCause
ResponseTimeRootCause
(Maybe [ResponseTimeRootCauseService])
(Maybe [ResponseTimeRootCauseService])
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) ((Maybe [ResponseTimeRootCauseService]
-> f (Maybe [ResponseTimeRootCauseService]))
-> ResponseTimeRootCause -> f ResponseTimeRootCause)
-> ((Maybe [ResponseTimeRootCauseService]
-> f (Maybe [ResponseTimeRootCauseService]))
-> Maybe [ResponseTimeRootCauseService]
-> f (Maybe [ResponseTimeRootCauseService]))
-> (Maybe [ResponseTimeRootCauseService]
-> f (Maybe [ResponseTimeRootCauseService]))
-> ResponseTimeRootCause
-> f ResponseTimeRootCause
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ResponseTimeRootCauseService]
[ResponseTimeRootCauseService]
[ResponseTimeRootCauseService]
[ResponseTimeRootCauseService]
-> Iso
(Maybe [ResponseTimeRootCauseService])
(Maybe [ResponseTimeRootCauseService])
(Maybe [ResponseTimeRootCauseService])
(Maybe [ResponseTimeRootCauseService])
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 AnIso
[ResponseTimeRootCauseService]
[ResponseTimeRootCauseService]
[ResponseTimeRootCauseService]
[ResponseTimeRootCauseService]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON ResponseTimeRootCause where
parseJSON :: Value -> Parser ResponseTimeRootCause
parseJSON =
String
-> (Object -> Parser ResponseTimeRootCause)
-> Value
-> Parser ResponseTimeRootCause
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ResponseTimeRootCause"
( \Object
x ->
Maybe Bool
-> Maybe [ResponseTimeRootCauseService] -> ResponseTimeRootCause
ResponseTimeRootCause'
(Maybe Bool
-> Maybe [ResponseTimeRootCauseService] -> ResponseTimeRootCause)
-> Parser (Maybe Bool)
-> Parser
(Maybe [ResponseTimeRootCauseService] -> ResponseTimeRootCause)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ClientImpacting")
Parser
(Maybe [ResponseTimeRootCauseService] -> ResponseTimeRootCause)
-> Parser (Maybe [ResponseTimeRootCauseService])
-> Parser ResponseTimeRootCause
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe (Maybe [ResponseTimeRootCauseService]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Services" Parser (Maybe (Maybe [ResponseTimeRootCauseService]))
-> Maybe [ResponseTimeRootCauseService]
-> Parser (Maybe [ResponseTimeRootCauseService])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ResponseTimeRootCauseService]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable ResponseTimeRootCause
instance Prelude.NFData ResponseTimeRootCause