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