module Stratosphere.Detective.Graph (
Graph(..), mkGraph
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Graph
=
Graph {Graph -> ()
haddock_workaround_ :: (),
Graph -> Maybe (Value Bool)
autoEnableMembers :: (Prelude.Maybe (Value Prelude.Bool)),
Graph -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (Graph -> Graph -> Bool
(Graph -> Graph -> Bool) -> (Graph -> Graph -> Bool) -> Eq Graph
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Graph -> Graph -> Bool
== :: Graph -> Graph -> Bool
$c/= :: Graph -> Graph -> Bool
/= :: Graph -> Graph -> Bool
Prelude.Eq, Int -> Graph -> ShowS
[Graph] -> ShowS
Graph -> String
(Int -> Graph -> ShowS)
-> (Graph -> String) -> ([Graph] -> ShowS) -> Show Graph
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Graph -> ShowS
showsPrec :: Int -> Graph -> ShowS
$cshow :: Graph -> String
show :: Graph -> String
$cshowList :: [Graph] -> ShowS
showList :: [Graph] -> ShowS
Prelude.Show)
mkGraph :: Graph
mkGraph :: Graph
mkGraph
= Graph
{haddock_workaround_ :: ()
haddock_workaround_ = (), autoEnableMembers :: Maybe (Value Bool)
autoEnableMembers = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Graph where
toResourceProperties :: Graph -> ResourceProperties
toResourceProperties Graph {Maybe [Tag]
Maybe (Value Bool)
()
haddock_workaround_ :: Graph -> ()
autoEnableMembers :: Graph -> Maybe (Value Bool)
tags :: Graph -> Maybe [Tag]
haddock_workaround_ :: ()
autoEnableMembers :: Maybe (Value Bool)
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Detective::Graph", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AutoEnableMembers" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
autoEnableMembers,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])}
instance JSON.ToJSON Graph where
toJSON :: Graph -> Value
toJSON Graph {Maybe [Tag]
Maybe (Value Bool)
()
haddock_workaround_ :: Graph -> ()
autoEnableMembers :: Graph -> Maybe (Value Bool)
tags :: Graph -> Maybe [Tag]
haddock_workaround_ :: ()
autoEnableMembers :: Maybe (Value Bool)
tags :: Maybe [Tag]
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AutoEnableMembers" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
autoEnableMembers,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))
instance Property "AutoEnableMembers" Graph where
type PropertyType "AutoEnableMembers" Graph = Value Prelude.Bool
set :: PropertyType "AutoEnableMembers" Graph -> Graph -> Graph
set PropertyType "AutoEnableMembers" Graph
newValue Graph {Maybe [Tag]
Maybe (Value Bool)
()
haddock_workaround_ :: Graph -> ()
autoEnableMembers :: Graph -> Maybe (Value Bool)
tags :: Graph -> Maybe [Tag]
haddock_workaround_ :: ()
autoEnableMembers :: Maybe (Value Bool)
tags :: Maybe [Tag]
..}
= Graph {autoEnableMembers :: Maybe (Value Bool)
autoEnableMembers = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AutoEnableMembers" Graph
Value Bool
newValue, Maybe [Tag]
()
haddock_workaround_ :: ()
tags :: Maybe [Tag]
haddock_workaround_ :: ()
tags :: Maybe [Tag]
..}
instance Property "Tags" Graph where
type PropertyType "Tags" Graph = [Tag]
set :: PropertyType "Tags" Graph -> Graph -> Graph
set PropertyType "Tags" Graph
newValue Graph {Maybe [Tag]
Maybe (Value Bool)
()
haddock_workaround_ :: Graph -> ()
autoEnableMembers :: Graph -> Maybe (Value Bool)
tags :: Graph -> Maybe [Tag]
haddock_workaround_ :: ()
autoEnableMembers :: Maybe (Value Bool)
tags :: Maybe [Tag]
..} = Graph {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" Graph
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
autoEnableMembers :: Maybe (Value Bool)
haddock_workaround_ :: ()
autoEnableMembers :: Maybe (Value Bool)
..}