{-# 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.InsightImpactGraphService where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.XRay.Types.InsightImpactGraphEdge
data InsightImpactGraphService = InsightImpactGraphService'
{
InsightImpactGraphService -> Maybe Int
referenceId :: Prelude.Maybe Prelude.Int,
InsightImpactGraphService -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
InsightImpactGraphService -> Maybe [Text]
names :: Prelude.Maybe [Prelude.Text],
InsightImpactGraphService -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
InsightImpactGraphService -> Maybe Text
type' :: Prelude.Maybe Prelude.Text,
InsightImpactGraphService -> Maybe [InsightImpactGraphEdge]
edges :: Prelude.Maybe [InsightImpactGraphEdge]
}
deriving (InsightImpactGraphService -> InsightImpactGraphService -> Bool
(InsightImpactGraphService -> InsightImpactGraphService -> Bool)
-> (InsightImpactGraphService -> InsightImpactGraphService -> Bool)
-> Eq InsightImpactGraphService
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InsightImpactGraphService -> InsightImpactGraphService -> Bool
$c/= :: InsightImpactGraphService -> InsightImpactGraphService -> Bool
== :: InsightImpactGraphService -> InsightImpactGraphService -> Bool
$c== :: InsightImpactGraphService -> InsightImpactGraphService -> Bool
Prelude.Eq, ReadPrec [InsightImpactGraphService]
ReadPrec InsightImpactGraphService
Int -> ReadS InsightImpactGraphService
ReadS [InsightImpactGraphService]
(Int -> ReadS InsightImpactGraphService)
-> ReadS [InsightImpactGraphService]
-> ReadPrec InsightImpactGraphService
-> ReadPrec [InsightImpactGraphService]
-> Read InsightImpactGraphService
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InsightImpactGraphService]
$creadListPrec :: ReadPrec [InsightImpactGraphService]
readPrec :: ReadPrec InsightImpactGraphService
$creadPrec :: ReadPrec InsightImpactGraphService
readList :: ReadS [InsightImpactGraphService]
$creadList :: ReadS [InsightImpactGraphService]
readsPrec :: Int -> ReadS InsightImpactGraphService
$creadsPrec :: Int -> ReadS InsightImpactGraphService
Prelude.Read, Int -> InsightImpactGraphService -> ShowS
[InsightImpactGraphService] -> ShowS
InsightImpactGraphService -> String
(Int -> InsightImpactGraphService -> ShowS)
-> (InsightImpactGraphService -> String)
-> ([InsightImpactGraphService] -> ShowS)
-> Show InsightImpactGraphService
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InsightImpactGraphService] -> ShowS
$cshowList :: [InsightImpactGraphService] -> ShowS
show :: InsightImpactGraphService -> String
$cshow :: InsightImpactGraphService -> String
showsPrec :: Int -> InsightImpactGraphService -> ShowS
$cshowsPrec :: Int -> InsightImpactGraphService -> ShowS
Prelude.Show, (forall x.
InsightImpactGraphService -> Rep InsightImpactGraphService x)
-> (forall x.
Rep InsightImpactGraphService x -> InsightImpactGraphService)
-> Generic InsightImpactGraphService
forall x.
Rep InsightImpactGraphService x -> InsightImpactGraphService
forall x.
InsightImpactGraphService -> Rep InsightImpactGraphService x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InsightImpactGraphService x -> InsightImpactGraphService
$cfrom :: forall x.
InsightImpactGraphService -> Rep InsightImpactGraphService x
Prelude.Generic)
newInsightImpactGraphService ::
InsightImpactGraphService
newInsightImpactGraphService :: InsightImpactGraphService
newInsightImpactGraphService =
InsightImpactGraphService' :: Maybe Int
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [InsightImpactGraphEdge]
-> InsightImpactGraphService
InsightImpactGraphService'
{ $sel:referenceId:InsightImpactGraphService' :: Maybe Int
referenceId =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:accountId:InsightImpactGraphService' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:names:InsightImpactGraphService' :: Maybe [Text]
names = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:name:InsightImpactGraphService' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':InsightImpactGraphService' :: Maybe Text
type' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:edges:InsightImpactGraphService' :: Maybe [InsightImpactGraphEdge]
edges = Maybe [InsightImpactGraphEdge]
forall a. Maybe a
Prelude.Nothing
}
insightImpactGraphService_referenceId :: Lens.Lens' InsightImpactGraphService (Prelude.Maybe Prelude.Int)
insightImpactGraphService_referenceId :: (Maybe Int -> f (Maybe Int))
-> InsightImpactGraphService -> f InsightImpactGraphService
insightImpactGraphService_referenceId = (InsightImpactGraphService -> Maybe Int)
-> (InsightImpactGraphService
-> Maybe Int -> InsightImpactGraphService)
-> Lens
InsightImpactGraphService
InsightImpactGraphService
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightImpactGraphService' {Maybe Int
referenceId :: Maybe Int
$sel:referenceId:InsightImpactGraphService' :: InsightImpactGraphService -> Maybe Int
referenceId} -> Maybe Int
referenceId) (\s :: InsightImpactGraphService
s@InsightImpactGraphService' {} Maybe Int
a -> InsightImpactGraphService
s {$sel:referenceId:InsightImpactGraphService' :: Maybe Int
referenceId = Maybe Int
a} :: InsightImpactGraphService)
insightImpactGraphService_accountId :: Lens.Lens' InsightImpactGraphService (Prelude.Maybe Prelude.Text)
insightImpactGraphService_accountId :: (Maybe Text -> f (Maybe Text))
-> InsightImpactGraphService -> f InsightImpactGraphService
insightImpactGraphService_accountId = (InsightImpactGraphService -> Maybe Text)
-> (InsightImpactGraphService
-> Maybe Text -> InsightImpactGraphService)
-> Lens
InsightImpactGraphService
InsightImpactGraphService
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightImpactGraphService' {Maybe Text
accountId :: Maybe Text
$sel:accountId:InsightImpactGraphService' :: InsightImpactGraphService -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: InsightImpactGraphService
s@InsightImpactGraphService' {} Maybe Text
a -> InsightImpactGraphService
s {$sel:accountId:InsightImpactGraphService' :: Maybe Text
accountId = Maybe Text
a} :: InsightImpactGraphService)
insightImpactGraphService_names :: Lens.Lens' InsightImpactGraphService (Prelude.Maybe [Prelude.Text])
insightImpactGraphService_names :: (Maybe [Text] -> f (Maybe [Text]))
-> InsightImpactGraphService -> f InsightImpactGraphService
insightImpactGraphService_names = (InsightImpactGraphService -> Maybe [Text])
-> (InsightImpactGraphService
-> Maybe [Text] -> InsightImpactGraphService)
-> Lens
InsightImpactGraphService
InsightImpactGraphService
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightImpactGraphService' {Maybe [Text]
names :: Maybe [Text]
$sel:names:InsightImpactGraphService' :: InsightImpactGraphService -> Maybe [Text]
names} -> Maybe [Text]
names) (\s :: InsightImpactGraphService
s@InsightImpactGraphService' {} Maybe [Text]
a -> InsightImpactGraphService
s {$sel:names:InsightImpactGraphService' :: Maybe [Text]
names = Maybe [Text]
a} :: InsightImpactGraphService) ((Maybe [Text] -> f (Maybe [Text]))
-> InsightImpactGraphService -> f InsightImpactGraphService)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> InsightImpactGraphService
-> f InsightImpactGraphService
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
insightImpactGraphService_name :: Lens.Lens' InsightImpactGraphService (Prelude.Maybe Prelude.Text)
insightImpactGraphService_name :: (Maybe Text -> f (Maybe Text))
-> InsightImpactGraphService -> f InsightImpactGraphService
insightImpactGraphService_name = (InsightImpactGraphService -> Maybe Text)
-> (InsightImpactGraphService
-> Maybe Text -> InsightImpactGraphService)
-> Lens
InsightImpactGraphService
InsightImpactGraphService
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightImpactGraphService' {Maybe Text
name :: Maybe Text
$sel:name:InsightImpactGraphService' :: InsightImpactGraphService -> Maybe Text
name} -> Maybe Text
name) (\s :: InsightImpactGraphService
s@InsightImpactGraphService' {} Maybe Text
a -> InsightImpactGraphService
s {$sel:name:InsightImpactGraphService' :: Maybe Text
name = Maybe Text
a} :: InsightImpactGraphService)
insightImpactGraphService_type :: Lens.Lens' InsightImpactGraphService (Prelude.Maybe Prelude.Text)
insightImpactGraphService_type :: (Maybe Text -> f (Maybe Text))
-> InsightImpactGraphService -> f InsightImpactGraphService
insightImpactGraphService_type = (InsightImpactGraphService -> Maybe Text)
-> (InsightImpactGraphService
-> Maybe Text -> InsightImpactGraphService)
-> Lens
InsightImpactGraphService
InsightImpactGraphService
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightImpactGraphService' {Maybe Text
type' :: Maybe Text
$sel:type':InsightImpactGraphService' :: InsightImpactGraphService -> Maybe Text
type'} -> Maybe Text
type') (\s :: InsightImpactGraphService
s@InsightImpactGraphService' {} Maybe Text
a -> InsightImpactGraphService
s {$sel:type':InsightImpactGraphService' :: Maybe Text
type' = Maybe Text
a} :: InsightImpactGraphService)
insightImpactGraphService_edges :: Lens.Lens' InsightImpactGraphService (Prelude.Maybe [InsightImpactGraphEdge])
insightImpactGraphService_edges :: (Maybe [InsightImpactGraphEdge]
-> f (Maybe [InsightImpactGraphEdge]))
-> InsightImpactGraphService -> f InsightImpactGraphService
insightImpactGraphService_edges = (InsightImpactGraphService -> Maybe [InsightImpactGraphEdge])
-> (InsightImpactGraphService
-> Maybe [InsightImpactGraphEdge] -> InsightImpactGraphService)
-> Lens
InsightImpactGraphService
InsightImpactGraphService
(Maybe [InsightImpactGraphEdge])
(Maybe [InsightImpactGraphEdge])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightImpactGraphService' {Maybe [InsightImpactGraphEdge]
edges :: Maybe [InsightImpactGraphEdge]
$sel:edges:InsightImpactGraphService' :: InsightImpactGraphService -> Maybe [InsightImpactGraphEdge]
edges} -> Maybe [InsightImpactGraphEdge]
edges) (\s :: InsightImpactGraphService
s@InsightImpactGraphService' {} Maybe [InsightImpactGraphEdge]
a -> InsightImpactGraphService
s {$sel:edges:InsightImpactGraphService' :: Maybe [InsightImpactGraphEdge]
edges = Maybe [InsightImpactGraphEdge]
a} :: InsightImpactGraphService) ((Maybe [InsightImpactGraphEdge]
-> f (Maybe [InsightImpactGraphEdge]))
-> InsightImpactGraphService -> f InsightImpactGraphService)
-> ((Maybe [InsightImpactGraphEdge]
-> f (Maybe [InsightImpactGraphEdge]))
-> Maybe [InsightImpactGraphEdge]
-> f (Maybe [InsightImpactGraphEdge]))
-> (Maybe [InsightImpactGraphEdge]
-> f (Maybe [InsightImpactGraphEdge]))
-> InsightImpactGraphService
-> f InsightImpactGraphService
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[InsightImpactGraphEdge]
[InsightImpactGraphEdge]
[InsightImpactGraphEdge]
[InsightImpactGraphEdge]
-> Iso
(Maybe [InsightImpactGraphEdge])
(Maybe [InsightImpactGraphEdge])
(Maybe [InsightImpactGraphEdge])
(Maybe [InsightImpactGraphEdge])
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
[InsightImpactGraphEdge]
[InsightImpactGraphEdge]
[InsightImpactGraphEdge]
[InsightImpactGraphEdge]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON InsightImpactGraphService where
parseJSON :: Value -> Parser InsightImpactGraphService
parseJSON =
String
-> (Object -> Parser InsightImpactGraphService)
-> Value
-> Parser InsightImpactGraphService
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"InsightImpactGraphService"
( \Object
x ->
Maybe Int
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [InsightImpactGraphEdge]
-> InsightImpactGraphService
InsightImpactGraphService'
(Maybe Int
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [InsightImpactGraphEdge]
-> InsightImpactGraphService)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [InsightImpactGraphEdge]
-> InsightImpactGraphService)
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")
Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [InsightImpactGraphEdge]
-> InsightImpactGraphService)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [InsightImpactGraphEdge]
-> InsightImpactGraphService)
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
"AccountId")
Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [InsightImpactGraphEdge]
-> InsightImpactGraphService)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe [InsightImpactGraphEdge]
-> InsightImpactGraphService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Names" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe Text
-> Maybe [InsightImpactGraphEdge]
-> InsightImpactGraphService)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [InsightImpactGraphEdge] -> InsightImpactGraphService)
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")
Parser
(Maybe Text
-> Maybe [InsightImpactGraphEdge] -> InsightImpactGraphService)
-> Parser (Maybe Text)
-> Parser
(Maybe [InsightImpactGraphEdge] -> InsightImpactGraphService)
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
"Type")
Parser
(Maybe [InsightImpactGraphEdge] -> InsightImpactGraphService)
-> Parser (Maybe [InsightImpactGraphEdge])
-> Parser InsightImpactGraphService
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [InsightImpactGraphEdge]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Edges" Parser (Maybe (Maybe [InsightImpactGraphEdge]))
-> Maybe [InsightImpactGraphEdge]
-> Parser (Maybe [InsightImpactGraphEdge])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [InsightImpactGraphEdge]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable InsightImpactGraphService
instance Prelude.NFData InsightImpactGraphService