module Stratosphere.Bedrock.FlowVersion.FlowConditionProperty (
        FlowConditionProperty(..), mkFlowConditionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FlowConditionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flowversion-flowcondition.html>
    FlowConditionProperty {FlowConditionProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flowversion-flowcondition.html#cfn-bedrock-flowversion-flowcondition-expression>
                           FlowConditionProperty -> Maybe (Value Text)
expression :: (Prelude.Maybe (Value Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flowversion-flowcondition.html#cfn-bedrock-flowversion-flowcondition-name>
                           FlowConditionProperty -> Value Text
name :: (Value Prelude.Text)}
  deriving stock (FlowConditionProperty -> FlowConditionProperty -> Bool
(FlowConditionProperty -> FlowConditionProperty -> Bool)
-> (FlowConditionProperty -> FlowConditionProperty -> Bool)
-> Eq FlowConditionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FlowConditionProperty -> FlowConditionProperty -> Bool
== :: FlowConditionProperty -> FlowConditionProperty -> Bool
$c/= :: FlowConditionProperty -> FlowConditionProperty -> Bool
/= :: FlowConditionProperty -> FlowConditionProperty -> Bool
Prelude.Eq, Int -> FlowConditionProperty -> ShowS
[FlowConditionProperty] -> ShowS
FlowConditionProperty -> String
(Int -> FlowConditionProperty -> ShowS)
-> (FlowConditionProperty -> String)
-> ([FlowConditionProperty] -> ShowS)
-> Show FlowConditionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FlowConditionProperty -> ShowS
showsPrec :: Int -> FlowConditionProperty -> ShowS
$cshow :: FlowConditionProperty -> String
show :: FlowConditionProperty -> String
$cshowList :: [FlowConditionProperty] -> ShowS
showList :: [FlowConditionProperty] -> ShowS
Prelude.Show)
mkFlowConditionProperty ::
  Value Prelude.Text -> FlowConditionProperty
mkFlowConditionProperty :: Value Text -> FlowConditionProperty
mkFlowConditionProperty Value Text
name
  = FlowConditionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
       expression :: Maybe (Value Text)
expression = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FlowConditionProperty where
  toResourceProperties :: FlowConditionProperty -> ResourceProperties
toResourceProperties FlowConditionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FlowConditionProperty -> ()
expression :: FlowConditionProperty -> Maybe (Value Text)
name :: FlowConditionProperty -> Value Text
haddock_workaround_ :: ()
expression :: Maybe (Value Text)
name :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Bedrock::FlowVersion.FlowCondition",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Expression" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
expression]))}
instance JSON.ToJSON FlowConditionProperty where
  toJSON :: FlowConditionProperty -> Value
toJSON FlowConditionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FlowConditionProperty -> ()
expression :: FlowConditionProperty -> Maybe (Value Text)
name :: FlowConditionProperty -> Value Text
haddock_workaround_ :: ()
expression :: Maybe (Value Text)
name :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Expression" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
expression])))
instance Property "Expression" FlowConditionProperty where
  type PropertyType "Expression" FlowConditionProperty = Value Prelude.Text
  set :: PropertyType "Expression" FlowConditionProperty
-> FlowConditionProperty -> FlowConditionProperty
set PropertyType "Expression" FlowConditionProperty
newValue FlowConditionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FlowConditionProperty -> ()
expression :: FlowConditionProperty -> Maybe (Value Text)
name :: FlowConditionProperty -> Value Text
haddock_workaround_ :: ()
expression :: Maybe (Value Text)
name :: Value Text
..}
    = FlowConditionProperty {expression :: Maybe (Value Text)
expression = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Expression" FlowConditionProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
name :: Value Text
haddock_workaround_ :: ()
name :: Value Text
..}
instance Property "Name" FlowConditionProperty where
  type PropertyType "Name" FlowConditionProperty = Value Prelude.Text
  set :: PropertyType "Name" FlowConditionProperty
-> FlowConditionProperty -> FlowConditionProperty
set PropertyType "Name" FlowConditionProperty
newValue FlowConditionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FlowConditionProperty -> ()
expression :: FlowConditionProperty -> Maybe (Value Text)
name :: FlowConditionProperty -> Value Text
haddock_workaround_ :: ()
expression :: Maybe (Value Text)
name :: Value Text
..}
    = FlowConditionProperty {name :: Value Text
name = PropertyType "Name" FlowConditionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
expression :: Maybe (Value Text)
haddock_workaround_ :: ()
expression :: Maybe (Value Text)
..}