{-# 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.ResponseTimeRootCauseEntity where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ResponseTimeRootCauseEntity = ResponseTimeRootCauseEntity'
{
ResponseTimeRootCauseEntity -> Maybe Bool
remote :: Prelude.Maybe Prelude.Bool,
ResponseTimeRootCauseEntity -> Maybe Double
coverage :: Prelude.Maybe Prelude.Double,
ResponseTimeRootCauseEntity -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (ResponseTimeRootCauseEntity -> ResponseTimeRootCauseEntity -> Bool
(ResponseTimeRootCauseEntity
-> ResponseTimeRootCauseEntity -> Bool)
-> (ResponseTimeRootCauseEntity
-> ResponseTimeRootCauseEntity -> Bool)
-> Eq ResponseTimeRootCauseEntity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResponseTimeRootCauseEntity -> ResponseTimeRootCauseEntity -> Bool
$c/= :: ResponseTimeRootCauseEntity -> ResponseTimeRootCauseEntity -> Bool
== :: ResponseTimeRootCauseEntity -> ResponseTimeRootCauseEntity -> Bool
$c== :: ResponseTimeRootCauseEntity -> ResponseTimeRootCauseEntity -> Bool
Prelude.Eq, ReadPrec [ResponseTimeRootCauseEntity]
ReadPrec ResponseTimeRootCauseEntity
Int -> ReadS ResponseTimeRootCauseEntity
ReadS [ResponseTimeRootCauseEntity]
(Int -> ReadS ResponseTimeRootCauseEntity)
-> ReadS [ResponseTimeRootCauseEntity]
-> ReadPrec ResponseTimeRootCauseEntity
-> ReadPrec [ResponseTimeRootCauseEntity]
-> Read ResponseTimeRootCauseEntity
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResponseTimeRootCauseEntity]
$creadListPrec :: ReadPrec [ResponseTimeRootCauseEntity]
readPrec :: ReadPrec ResponseTimeRootCauseEntity
$creadPrec :: ReadPrec ResponseTimeRootCauseEntity
readList :: ReadS [ResponseTimeRootCauseEntity]
$creadList :: ReadS [ResponseTimeRootCauseEntity]
readsPrec :: Int -> ReadS ResponseTimeRootCauseEntity
$creadsPrec :: Int -> ReadS ResponseTimeRootCauseEntity
Prelude.Read, Int -> ResponseTimeRootCauseEntity -> ShowS
[ResponseTimeRootCauseEntity] -> ShowS
ResponseTimeRootCauseEntity -> String
(Int -> ResponseTimeRootCauseEntity -> ShowS)
-> (ResponseTimeRootCauseEntity -> String)
-> ([ResponseTimeRootCauseEntity] -> ShowS)
-> Show ResponseTimeRootCauseEntity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResponseTimeRootCauseEntity] -> ShowS
$cshowList :: [ResponseTimeRootCauseEntity] -> ShowS
show :: ResponseTimeRootCauseEntity -> String
$cshow :: ResponseTimeRootCauseEntity -> String
showsPrec :: Int -> ResponseTimeRootCauseEntity -> ShowS
$cshowsPrec :: Int -> ResponseTimeRootCauseEntity -> ShowS
Prelude.Show, (forall x.
ResponseTimeRootCauseEntity -> Rep ResponseTimeRootCauseEntity x)
-> (forall x.
Rep ResponseTimeRootCauseEntity x -> ResponseTimeRootCauseEntity)
-> Generic ResponseTimeRootCauseEntity
forall x.
Rep ResponseTimeRootCauseEntity x -> ResponseTimeRootCauseEntity
forall x.
ResponseTimeRootCauseEntity -> Rep ResponseTimeRootCauseEntity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ResponseTimeRootCauseEntity x -> ResponseTimeRootCauseEntity
$cfrom :: forall x.
ResponseTimeRootCauseEntity -> Rep ResponseTimeRootCauseEntity x
Prelude.Generic)
newResponseTimeRootCauseEntity ::
ResponseTimeRootCauseEntity
newResponseTimeRootCauseEntity :: ResponseTimeRootCauseEntity
newResponseTimeRootCauseEntity =
ResponseTimeRootCauseEntity' :: Maybe Bool
-> Maybe Double -> Maybe Text -> ResponseTimeRootCauseEntity
ResponseTimeRootCauseEntity'
{ $sel:remote:ResponseTimeRootCauseEntity' :: Maybe Bool
remote =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:coverage:ResponseTimeRootCauseEntity' :: Maybe Double
coverage = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:name:ResponseTimeRootCauseEntity' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
responseTimeRootCauseEntity_remote :: Lens.Lens' ResponseTimeRootCauseEntity (Prelude.Maybe Prelude.Bool)
responseTimeRootCauseEntity_remote :: (Maybe Bool -> f (Maybe Bool))
-> ResponseTimeRootCauseEntity -> f ResponseTimeRootCauseEntity
responseTimeRootCauseEntity_remote = (ResponseTimeRootCauseEntity -> Maybe Bool)
-> (ResponseTimeRootCauseEntity
-> Maybe Bool -> ResponseTimeRootCauseEntity)
-> Lens
ResponseTimeRootCauseEntity
ResponseTimeRootCauseEntity
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResponseTimeRootCauseEntity' {Maybe Bool
remote :: Maybe Bool
$sel:remote:ResponseTimeRootCauseEntity' :: ResponseTimeRootCauseEntity -> Maybe Bool
remote} -> Maybe Bool
remote) (\s :: ResponseTimeRootCauseEntity
s@ResponseTimeRootCauseEntity' {} Maybe Bool
a -> ResponseTimeRootCauseEntity
s {$sel:remote:ResponseTimeRootCauseEntity' :: Maybe Bool
remote = Maybe Bool
a} :: ResponseTimeRootCauseEntity)
responseTimeRootCauseEntity_coverage :: Lens.Lens' ResponseTimeRootCauseEntity (Prelude.Maybe Prelude.Double)
responseTimeRootCauseEntity_coverage :: (Maybe Double -> f (Maybe Double))
-> ResponseTimeRootCauseEntity -> f ResponseTimeRootCauseEntity
responseTimeRootCauseEntity_coverage = (ResponseTimeRootCauseEntity -> Maybe Double)
-> (ResponseTimeRootCauseEntity
-> Maybe Double -> ResponseTimeRootCauseEntity)
-> Lens
ResponseTimeRootCauseEntity
ResponseTimeRootCauseEntity
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResponseTimeRootCauseEntity' {Maybe Double
coverage :: Maybe Double
$sel:coverage:ResponseTimeRootCauseEntity' :: ResponseTimeRootCauseEntity -> Maybe Double
coverage} -> Maybe Double
coverage) (\s :: ResponseTimeRootCauseEntity
s@ResponseTimeRootCauseEntity' {} Maybe Double
a -> ResponseTimeRootCauseEntity
s {$sel:coverage:ResponseTimeRootCauseEntity' :: Maybe Double
coverage = Maybe Double
a} :: ResponseTimeRootCauseEntity)
responseTimeRootCauseEntity_name :: Lens.Lens' ResponseTimeRootCauseEntity (Prelude.Maybe Prelude.Text)
responseTimeRootCauseEntity_name :: (Maybe Text -> f (Maybe Text))
-> ResponseTimeRootCauseEntity -> f ResponseTimeRootCauseEntity
responseTimeRootCauseEntity_name = (ResponseTimeRootCauseEntity -> Maybe Text)
-> (ResponseTimeRootCauseEntity
-> Maybe Text -> ResponseTimeRootCauseEntity)
-> Lens
ResponseTimeRootCauseEntity
ResponseTimeRootCauseEntity
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResponseTimeRootCauseEntity' {Maybe Text
name :: Maybe Text
$sel:name:ResponseTimeRootCauseEntity' :: ResponseTimeRootCauseEntity -> Maybe Text
name} -> Maybe Text
name) (\s :: ResponseTimeRootCauseEntity
s@ResponseTimeRootCauseEntity' {} Maybe Text
a -> ResponseTimeRootCauseEntity
s {$sel:name:ResponseTimeRootCauseEntity' :: Maybe Text
name = Maybe Text
a} :: ResponseTimeRootCauseEntity)
instance Core.FromJSON ResponseTimeRootCauseEntity where
parseJSON :: Value -> Parser ResponseTimeRootCauseEntity
parseJSON =
String
-> (Object -> Parser ResponseTimeRootCauseEntity)
-> Value
-> Parser ResponseTimeRootCauseEntity
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ResponseTimeRootCauseEntity"
( \Object
x ->
Maybe Bool
-> Maybe Double -> Maybe Text -> ResponseTimeRootCauseEntity
ResponseTimeRootCauseEntity'
(Maybe Bool
-> Maybe Double -> Maybe Text -> ResponseTimeRootCauseEntity)
-> Parser (Maybe Bool)
-> Parser
(Maybe Double -> Maybe Text -> ResponseTimeRootCauseEntity)
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
"Remote")
Parser (Maybe Double -> Maybe Text -> ResponseTimeRootCauseEntity)
-> Parser (Maybe Double)
-> Parser (Maybe Text -> ResponseTimeRootCauseEntity)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Coverage")
Parser (Maybe Text -> ResponseTimeRootCauseEntity)
-> Parser (Maybe Text) -> Parser ResponseTimeRootCauseEntity
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
)
instance Prelude.Hashable ResponseTimeRootCauseEntity
instance Prelude.NFData ResponseTimeRootCauseEntity