module Stratosphere.Bedrock.FlowVersion.FlowDefinitionProperty (
module Exports, FlowDefinitionProperty(..),
mkFlowDefinitionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Bedrock.FlowVersion.FlowConnectionProperty as Exports
import {-# SOURCE #-} Stratosphere.Bedrock.FlowVersion.FlowNodeProperty as Exports
import Stratosphere.ResourceProperties
data FlowDefinitionProperty
=
FlowDefinitionProperty {FlowDefinitionProperty -> ()
haddock_workaround_ :: (),
FlowDefinitionProperty -> Maybe [FlowConnectionProperty]
connections :: (Prelude.Maybe [FlowConnectionProperty]),
FlowDefinitionProperty -> Maybe [FlowNodeProperty]
nodes :: (Prelude.Maybe [FlowNodeProperty])}
deriving stock (FlowDefinitionProperty -> FlowDefinitionProperty -> Bool
(FlowDefinitionProperty -> FlowDefinitionProperty -> Bool)
-> (FlowDefinitionProperty -> FlowDefinitionProperty -> Bool)
-> Eq FlowDefinitionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FlowDefinitionProperty -> FlowDefinitionProperty -> Bool
== :: FlowDefinitionProperty -> FlowDefinitionProperty -> Bool
$c/= :: FlowDefinitionProperty -> FlowDefinitionProperty -> Bool
/= :: FlowDefinitionProperty -> FlowDefinitionProperty -> Bool
Prelude.Eq, Int -> FlowDefinitionProperty -> ShowS
[FlowDefinitionProperty] -> ShowS
FlowDefinitionProperty -> String
(Int -> FlowDefinitionProperty -> ShowS)
-> (FlowDefinitionProperty -> String)
-> ([FlowDefinitionProperty] -> ShowS)
-> Show FlowDefinitionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FlowDefinitionProperty -> ShowS
showsPrec :: Int -> FlowDefinitionProperty -> ShowS
$cshow :: FlowDefinitionProperty -> String
show :: FlowDefinitionProperty -> String
$cshowList :: [FlowDefinitionProperty] -> ShowS
showList :: [FlowDefinitionProperty] -> ShowS
Prelude.Show)
mkFlowDefinitionProperty :: FlowDefinitionProperty
mkFlowDefinitionProperty :: FlowDefinitionProperty
mkFlowDefinitionProperty
= FlowDefinitionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), connections :: Maybe [FlowConnectionProperty]
connections = Maybe [FlowConnectionProperty]
forall a. Maybe a
Prelude.Nothing,
nodes :: Maybe [FlowNodeProperty]
nodes = Maybe [FlowNodeProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FlowDefinitionProperty where
toResourceProperties :: FlowDefinitionProperty -> ResourceProperties
toResourceProperties FlowDefinitionProperty {Maybe [FlowConnectionProperty]
Maybe [FlowNodeProperty]
()
haddock_workaround_ :: FlowDefinitionProperty -> ()
connections :: FlowDefinitionProperty -> Maybe [FlowConnectionProperty]
nodes :: FlowDefinitionProperty -> Maybe [FlowNodeProperty]
haddock_workaround_ :: ()
connections :: Maybe [FlowConnectionProperty]
nodes :: Maybe [FlowNodeProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Bedrock::FlowVersion.FlowDefinition",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
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 -> [FlowConnectionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Connections" ([FlowConnectionProperty] -> (Key, Value))
-> Maybe [FlowConnectionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [FlowConnectionProperty]
connections,
Key -> [FlowNodeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Nodes" ([FlowNodeProperty] -> (Key, Value))
-> Maybe [FlowNodeProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [FlowNodeProperty]
nodes])}
instance JSON.ToJSON FlowDefinitionProperty where
toJSON :: FlowDefinitionProperty -> Value
toJSON FlowDefinitionProperty {Maybe [FlowConnectionProperty]
Maybe [FlowNodeProperty]
()
haddock_workaround_ :: FlowDefinitionProperty -> ()
connections :: FlowDefinitionProperty -> Maybe [FlowConnectionProperty]
nodes :: FlowDefinitionProperty -> Maybe [FlowNodeProperty]
haddock_workaround_ :: ()
connections :: Maybe [FlowConnectionProperty]
nodes :: Maybe [FlowNodeProperty]
..}
= [(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 -> [FlowConnectionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Connections" ([FlowConnectionProperty] -> (Key, Value))
-> Maybe [FlowConnectionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [FlowConnectionProperty]
connections,
Key -> [FlowNodeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Nodes" ([FlowNodeProperty] -> (Key, Value))
-> Maybe [FlowNodeProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [FlowNodeProperty]
nodes]))
instance Property "Connections" FlowDefinitionProperty where
type PropertyType "Connections" FlowDefinitionProperty = [FlowConnectionProperty]
set :: PropertyType "Connections" FlowDefinitionProperty
-> FlowDefinitionProperty -> FlowDefinitionProperty
set PropertyType "Connections" FlowDefinitionProperty
newValue FlowDefinitionProperty {Maybe [FlowConnectionProperty]
Maybe [FlowNodeProperty]
()
haddock_workaround_ :: FlowDefinitionProperty -> ()
connections :: FlowDefinitionProperty -> Maybe [FlowConnectionProperty]
nodes :: FlowDefinitionProperty -> Maybe [FlowNodeProperty]
haddock_workaround_ :: ()
connections :: Maybe [FlowConnectionProperty]
nodes :: Maybe [FlowNodeProperty]
..}
= FlowDefinitionProperty {connections :: Maybe [FlowConnectionProperty]
connections = [FlowConnectionProperty] -> Maybe [FlowConnectionProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [FlowConnectionProperty]
PropertyType "Connections" FlowDefinitionProperty
newValue, Maybe [FlowNodeProperty]
()
haddock_workaround_ :: ()
nodes :: Maybe [FlowNodeProperty]
haddock_workaround_ :: ()
nodes :: Maybe [FlowNodeProperty]
..}
instance Property "Nodes" FlowDefinitionProperty where
type PropertyType "Nodes" FlowDefinitionProperty = [FlowNodeProperty]
set :: PropertyType "Nodes" FlowDefinitionProperty
-> FlowDefinitionProperty -> FlowDefinitionProperty
set PropertyType "Nodes" FlowDefinitionProperty
newValue FlowDefinitionProperty {Maybe [FlowConnectionProperty]
Maybe [FlowNodeProperty]
()
haddock_workaround_ :: FlowDefinitionProperty -> ()
connections :: FlowDefinitionProperty -> Maybe [FlowConnectionProperty]
nodes :: FlowDefinitionProperty -> Maybe [FlowNodeProperty]
haddock_workaround_ :: ()
connections :: Maybe [FlowConnectionProperty]
nodes :: Maybe [FlowNodeProperty]
..}
= FlowDefinitionProperty {nodes :: Maybe [FlowNodeProperty]
nodes = [FlowNodeProperty] -> Maybe [FlowNodeProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [FlowNodeProperty]
PropertyType "Nodes" FlowDefinitionProperty
newValue, Maybe [FlowConnectionProperty]
()
haddock_workaround_ :: ()
connections :: Maybe [FlowConnectionProperty]
haddock_workaround_ :: ()
connections :: Maybe [FlowConnectionProperty]
..}