{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.XRay.Types.InsightImpactGraphEdge
data InsightImpactGraphService = InsightImpactGraphService'
{
InsightImpactGraphService -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
InsightImpactGraphService -> Maybe [InsightImpactGraphEdge]
edges :: Prelude.Maybe [InsightImpactGraphEdge],
InsightImpactGraphService -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
InsightImpactGraphService -> Maybe [Text]
names :: Prelude.Maybe [Prelude.Text],
InsightImpactGraphService -> Maybe Int
referenceId :: Prelude.Maybe Prelude.Int,
InsightImpactGraphService -> Maybe Text
type' :: Prelude.Maybe Prelude.Text
}
deriving (InsightImpactGraphService -> InsightImpactGraphService -> Bool
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]
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
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.
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'
{ $sel:accountId:InsightImpactGraphService' :: Maybe Text
accountId =
forall a. Maybe a
Prelude.Nothing,
$sel:edges:InsightImpactGraphService' :: Maybe [InsightImpactGraphEdge]
edges = forall a. Maybe a
Prelude.Nothing,
$sel:name:InsightImpactGraphService' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:names:InsightImpactGraphService' :: Maybe [Text]
names = forall a. Maybe a
Prelude.Nothing,
$sel:referenceId:InsightImpactGraphService' :: Maybe Int
referenceId = forall a. Maybe a
Prelude.Nothing,
$sel:type':InsightImpactGraphService' :: Maybe Text
type' = forall a. Maybe a
Prelude.Nothing
}
insightImpactGraphService_accountId :: Lens.Lens' InsightImpactGraphService (Prelude.Maybe Prelude.Text)
insightImpactGraphService_accountId :: Lens' InsightImpactGraphService (Maybe Text)
insightImpactGraphService_accountId = 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_edges :: Lens.Lens' InsightImpactGraphService (Prelude.Maybe [InsightImpactGraphEdge])
insightImpactGraphService_edges :: Lens' InsightImpactGraphService (Maybe [InsightImpactGraphEdge])
insightImpactGraphService_edges = 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) 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
insightImpactGraphService_name :: Lens.Lens' InsightImpactGraphService (Prelude.Maybe Prelude.Text)
insightImpactGraphService_name :: Lens' InsightImpactGraphService (Maybe Text)
insightImpactGraphService_name = 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_names :: Lens.Lens' InsightImpactGraphService (Prelude.Maybe [Prelude.Text])
insightImpactGraphService_names :: Lens' InsightImpactGraphService (Maybe [Text])
insightImpactGraphService_names = 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) 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
insightImpactGraphService_referenceId :: Lens.Lens' InsightImpactGraphService (Prelude.Maybe Prelude.Int)
insightImpactGraphService_referenceId :: Lens' InsightImpactGraphService (Maybe Int)
insightImpactGraphService_referenceId = 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_type :: Lens.Lens' InsightImpactGraphService (Prelude.Maybe Prelude.Text)
insightImpactGraphService_type :: Lens' InsightImpactGraphService (Maybe Text)
insightImpactGraphService_type = 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)
instance Data.FromJSON InsightImpactGraphService where
parseJSON :: Value -> Parser InsightImpactGraphService
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"InsightImpactGraphService"
( \Object
x ->
Maybe Text
-> Maybe [InsightImpactGraphEdge]
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> InsightImpactGraphService
InsightImpactGraphService'
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
"AccountId")
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
"Edges" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
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
"Name")
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
"Names" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
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
"ReferenceId")
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
"Type")
)
instance Prelude.Hashable InsightImpactGraphService where
hashWithSalt :: Int -> InsightImpactGraphService -> Int
hashWithSalt Int
_salt InsightImpactGraphService' {Maybe Int
Maybe [Text]
Maybe [InsightImpactGraphEdge]
Maybe Text
type' :: Maybe Text
referenceId :: Maybe Int
names :: Maybe [Text]
name :: Maybe Text
edges :: Maybe [InsightImpactGraphEdge]
accountId :: Maybe Text
$sel:type':InsightImpactGraphService' :: InsightImpactGraphService -> Maybe Text
$sel:referenceId:InsightImpactGraphService' :: InsightImpactGraphService -> Maybe Int
$sel:names:InsightImpactGraphService' :: InsightImpactGraphService -> Maybe [Text]
$sel:name:InsightImpactGraphService' :: InsightImpactGraphService -> Maybe Text
$sel:edges:InsightImpactGraphService' :: InsightImpactGraphService -> Maybe [InsightImpactGraphEdge]
$sel:accountId:InsightImpactGraphService' :: InsightImpactGraphService -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
accountId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [InsightImpactGraphEdge]
edges
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
names
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
referenceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
type'
instance Prelude.NFData InsightImpactGraphService where
rnf :: InsightImpactGraphService -> ()
rnf InsightImpactGraphService' {Maybe Int
Maybe [Text]
Maybe [InsightImpactGraphEdge]
Maybe Text
type' :: Maybe Text
referenceId :: Maybe Int
names :: Maybe [Text]
name :: Maybe Text
edges :: Maybe [InsightImpactGraphEdge]
accountId :: Maybe Text
$sel:type':InsightImpactGraphService' :: InsightImpactGraphService -> Maybe Text
$sel:referenceId:InsightImpactGraphService' :: InsightImpactGraphService -> Maybe Int
$sel:names:InsightImpactGraphService' :: InsightImpactGraphService -> Maybe [Text]
$sel:name:InsightImpactGraphService' :: InsightImpactGraphService -> Maybe Text
$sel:edges:InsightImpactGraphService' :: InsightImpactGraphService -> Maybe [InsightImpactGraphEdge]
$sel:accountId:InsightImpactGraphService' :: InsightImpactGraphService -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
accountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [InsightImpactGraphEdge]
edges
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
names
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
referenceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
type'