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