module Stratosphere.Bedrock.FlowVersion.FlowConnectionConfigurationProperty (
        module Exports, FlowConnectionConfigurationProperty(..),
        mkFlowConnectionConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Bedrock.FlowVersion.FlowConditionalConnectionConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.Bedrock.FlowVersion.FlowDataConnectionConfigurationProperty as Exports
import Stratosphere.ResourceProperties
data FlowConnectionConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flowversion-flowconnectionconfiguration.html>
    FlowConnectionConfigurationProperty {FlowConnectionConfigurationProperty -> ()
haddock_workaround_ :: (),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flowversion-flowconnectionconfiguration.html#cfn-bedrock-flowversion-flowconnectionconfiguration-conditional>
                                         FlowConnectionConfigurationProperty
-> Maybe FlowConditionalConnectionConfigurationProperty
conditional :: (Prelude.Maybe FlowConditionalConnectionConfigurationProperty),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flowversion-flowconnectionconfiguration.html#cfn-bedrock-flowversion-flowconnectionconfiguration-data>
                                         FlowConnectionConfigurationProperty
-> Maybe FlowDataConnectionConfigurationProperty
data' :: (Prelude.Maybe FlowDataConnectionConfigurationProperty)}
  deriving stock (FlowConnectionConfigurationProperty
-> FlowConnectionConfigurationProperty -> Bool
(FlowConnectionConfigurationProperty
 -> FlowConnectionConfigurationProperty -> Bool)
-> (FlowConnectionConfigurationProperty
    -> FlowConnectionConfigurationProperty -> Bool)
-> Eq FlowConnectionConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FlowConnectionConfigurationProperty
-> FlowConnectionConfigurationProperty -> Bool
== :: FlowConnectionConfigurationProperty
-> FlowConnectionConfigurationProperty -> Bool
$c/= :: FlowConnectionConfigurationProperty
-> FlowConnectionConfigurationProperty -> Bool
/= :: FlowConnectionConfigurationProperty
-> FlowConnectionConfigurationProperty -> Bool
Prelude.Eq, Int -> FlowConnectionConfigurationProperty -> ShowS
[FlowConnectionConfigurationProperty] -> ShowS
FlowConnectionConfigurationProperty -> String
(Int -> FlowConnectionConfigurationProperty -> ShowS)
-> (FlowConnectionConfigurationProperty -> String)
-> ([FlowConnectionConfigurationProperty] -> ShowS)
-> Show FlowConnectionConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FlowConnectionConfigurationProperty -> ShowS
showsPrec :: Int -> FlowConnectionConfigurationProperty -> ShowS
$cshow :: FlowConnectionConfigurationProperty -> String
show :: FlowConnectionConfigurationProperty -> String
$cshowList :: [FlowConnectionConfigurationProperty] -> ShowS
showList :: [FlowConnectionConfigurationProperty] -> ShowS
Prelude.Show)
mkFlowConnectionConfigurationProperty ::
  FlowConnectionConfigurationProperty
mkFlowConnectionConfigurationProperty :: FlowConnectionConfigurationProperty
mkFlowConnectionConfigurationProperty
  = FlowConnectionConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), conditional :: Maybe FlowConditionalConnectionConfigurationProperty
conditional = Maybe FlowConditionalConnectionConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       data' :: Maybe FlowDataConnectionConfigurationProperty
data' = Maybe FlowDataConnectionConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FlowConnectionConfigurationProperty where
  toResourceProperties :: FlowConnectionConfigurationProperty -> ResourceProperties
toResourceProperties FlowConnectionConfigurationProperty {Maybe FlowConditionalConnectionConfigurationProperty
Maybe FlowDataConnectionConfigurationProperty
()
haddock_workaround_ :: FlowConnectionConfigurationProperty -> ()
conditional :: FlowConnectionConfigurationProperty
-> Maybe FlowConditionalConnectionConfigurationProperty
data' :: FlowConnectionConfigurationProperty
-> Maybe FlowDataConnectionConfigurationProperty
haddock_workaround_ :: ()
conditional :: Maybe FlowConditionalConnectionConfigurationProperty
data' :: Maybe FlowDataConnectionConfigurationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Bedrock::FlowVersion.FlowConnectionConfiguration",
         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
-> FlowConditionalConnectionConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Conditional" (FlowConditionalConnectionConfigurationProperty -> (Key, Value))
-> Maybe FlowConditionalConnectionConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FlowConditionalConnectionConfigurationProperty
conditional,
                            Key -> FlowDataConnectionConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Data" (FlowDataConnectionConfigurationProperty -> (Key, Value))
-> Maybe FlowDataConnectionConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FlowDataConnectionConfigurationProperty
data'])}
instance JSON.ToJSON FlowConnectionConfigurationProperty where
  toJSON :: FlowConnectionConfigurationProperty -> Value
toJSON FlowConnectionConfigurationProperty {Maybe FlowConditionalConnectionConfigurationProperty
Maybe FlowDataConnectionConfigurationProperty
()
haddock_workaround_ :: FlowConnectionConfigurationProperty -> ()
conditional :: FlowConnectionConfigurationProperty
-> Maybe FlowConditionalConnectionConfigurationProperty
data' :: FlowConnectionConfigurationProperty
-> Maybe FlowDataConnectionConfigurationProperty
haddock_workaround_ :: ()
conditional :: Maybe FlowConditionalConnectionConfigurationProperty
data' :: Maybe FlowDataConnectionConfigurationProperty
..}
    = [(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
-> FlowConditionalConnectionConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Conditional" (FlowConditionalConnectionConfigurationProperty -> (Key, Value))
-> Maybe FlowConditionalConnectionConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FlowConditionalConnectionConfigurationProperty
conditional,
               Key -> FlowDataConnectionConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Data" (FlowDataConnectionConfigurationProperty -> (Key, Value))
-> Maybe FlowDataConnectionConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FlowDataConnectionConfigurationProperty
data']))
instance Property "Conditional" FlowConnectionConfigurationProperty where
  type PropertyType "Conditional" FlowConnectionConfigurationProperty = FlowConditionalConnectionConfigurationProperty
  set :: PropertyType "Conditional" FlowConnectionConfigurationProperty
-> FlowConnectionConfigurationProperty
-> FlowConnectionConfigurationProperty
set PropertyType "Conditional" FlowConnectionConfigurationProperty
newValue FlowConnectionConfigurationProperty {Maybe FlowConditionalConnectionConfigurationProperty
Maybe FlowDataConnectionConfigurationProperty
()
haddock_workaround_ :: FlowConnectionConfigurationProperty -> ()
conditional :: FlowConnectionConfigurationProperty
-> Maybe FlowConditionalConnectionConfigurationProperty
data' :: FlowConnectionConfigurationProperty
-> Maybe FlowDataConnectionConfigurationProperty
haddock_workaround_ :: ()
conditional :: Maybe FlowConditionalConnectionConfigurationProperty
data' :: Maybe FlowDataConnectionConfigurationProperty
..}
    = FlowConnectionConfigurationProperty
        {conditional :: Maybe FlowConditionalConnectionConfigurationProperty
conditional = FlowConditionalConnectionConfigurationProperty
-> Maybe FlowConditionalConnectionConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Conditional" FlowConnectionConfigurationProperty
FlowConditionalConnectionConfigurationProperty
newValue, Maybe FlowDataConnectionConfigurationProperty
()
haddock_workaround_ :: ()
data' :: Maybe FlowDataConnectionConfigurationProperty
haddock_workaround_ :: ()
data' :: Maybe FlowDataConnectionConfigurationProperty
..}
instance Property "Data" FlowConnectionConfigurationProperty where
  type PropertyType "Data" FlowConnectionConfigurationProperty = FlowDataConnectionConfigurationProperty
  set :: PropertyType "Data" FlowConnectionConfigurationProperty
-> FlowConnectionConfigurationProperty
-> FlowConnectionConfigurationProperty
set PropertyType "Data" FlowConnectionConfigurationProperty
newValue FlowConnectionConfigurationProperty {Maybe FlowConditionalConnectionConfigurationProperty
Maybe FlowDataConnectionConfigurationProperty
()
haddock_workaround_ :: FlowConnectionConfigurationProperty -> ()
conditional :: FlowConnectionConfigurationProperty
-> Maybe FlowConditionalConnectionConfigurationProperty
data' :: FlowConnectionConfigurationProperty
-> Maybe FlowDataConnectionConfigurationProperty
haddock_workaround_ :: ()
conditional :: Maybe FlowConditionalConnectionConfigurationProperty
data' :: Maybe FlowDataConnectionConfigurationProperty
..}
    = FlowConnectionConfigurationProperty
        {data' :: Maybe FlowDataConnectionConfigurationProperty
data' = FlowDataConnectionConfigurationProperty
-> Maybe FlowDataConnectionConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Data" FlowConnectionConfigurationProperty
FlowDataConnectionConfigurationProperty
newValue, Maybe FlowConditionalConnectionConfigurationProperty
()
haddock_workaround_ :: ()
conditional :: Maybe FlowConditionalConnectionConfigurationProperty
haddock_workaround_ :: ()
conditional :: Maybe FlowConditionalConnectionConfigurationProperty
..}