module Stratosphere.Lex.Bot.ConditionalBranchProperty (
        module Exports, ConditionalBranchProperty(..),
        mkConditionalBranchProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Lex.Bot.ConditionProperty as Exports
import {-# SOURCE #-} Stratosphere.Lex.Bot.DialogStateProperty as Exports
import {-# SOURCE #-} Stratosphere.Lex.Bot.ResponseSpecificationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConditionalBranchProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-conditionalbranch.html>
    ConditionalBranchProperty {ConditionalBranchProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-conditionalbranch.html#cfn-lex-bot-conditionalbranch-condition>
                               ConditionalBranchProperty -> ConditionProperty
condition :: ConditionProperty,
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-conditionalbranch.html#cfn-lex-bot-conditionalbranch-name>
                               ConditionalBranchProperty -> Value Text
name :: (Value Prelude.Text),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-conditionalbranch.html#cfn-lex-bot-conditionalbranch-nextstep>
                               ConditionalBranchProperty -> DialogStateProperty
nextStep :: DialogStateProperty,
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-conditionalbranch.html#cfn-lex-bot-conditionalbranch-response>
                               ConditionalBranchProperty -> Maybe ResponseSpecificationProperty
response :: (Prelude.Maybe ResponseSpecificationProperty)}
  deriving stock (ConditionalBranchProperty -> ConditionalBranchProperty -> Bool
(ConditionalBranchProperty -> ConditionalBranchProperty -> Bool)
-> (ConditionalBranchProperty -> ConditionalBranchProperty -> Bool)
-> Eq ConditionalBranchProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConditionalBranchProperty -> ConditionalBranchProperty -> Bool
== :: ConditionalBranchProperty -> ConditionalBranchProperty -> Bool
$c/= :: ConditionalBranchProperty -> ConditionalBranchProperty -> Bool
/= :: ConditionalBranchProperty -> ConditionalBranchProperty -> Bool
Prelude.Eq, Int -> ConditionalBranchProperty -> ShowS
[ConditionalBranchProperty] -> ShowS
ConditionalBranchProperty -> String
(Int -> ConditionalBranchProperty -> ShowS)
-> (ConditionalBranchProperty -> String)
-> ([ConditionalBranchProperty] -> ShowS)
-> Show ConditionalBranchProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConditionalBranchProperty -> ShowS
showsPrec :: Int -> ConditionalBranchProperty -> ShowS
$cshow :: ConditionalBranchProperty -> String
show :: ConditionalBranchProperty -> String
$cshowList :: [ConditionalBranchProperty] -> ShowS
showList :: [ConditionalBranchProperty] -> ShowS
Prelude.Show)
mkConditionalBranchProperty ::
  ConditionProperty
  -> Value Prelude.Text
     -> DialogStateProperty -> ConditionalBranchProperty
mkConditionalBranchProperty :: ConditionProperty
-> Value Text -> DialogStateProperty -> ConditionalBranchProperty
mkConditionalBranchProperty ConditionProperty
condition Value Text
name DialogStateProperty
nextStep
  = ConditionalBranchProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), condition :: ConditionProperty
condition = ConditionProperty
condition, name :: Value Text
name = Value Text
name,
       nextStep :: DialogStateProperty
nextStep = DialogStateProperty
nextStep, response :: Maybe ResponseSpecificationProperty
response = Maybe ResponseSpecificationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConditionalBranchProperty where
  toResourceProperties :: ConditionalBranchProperty -> ResourceProperties
toResourceProperties ConditionalBranchProperty {Maybe ResponseSpecificationProperty
()
Value Text
ConditionProperty
DialogStateProperty
haddock_workaround_ :: ConditionalBranchProperty -> ()
condition :: ConditionalBranchProperty -> ConditionProperty
name :: ConditionalBranchProperty -> Value Text
nextStep :: ConditionalBranchProperty -> DialogStateProperty
response :: ConditionalBranchProperty -> Maybe ResponseSpecificationProperty
haddock_workaround_ :: ()
condition :: ConditionProperty
name :: Value Text
nextStep :: DialogStateProperty
response :: Maybe ResponseSpecificationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Lex::Bot.ConditionalBranch",
         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
"Condition" Key -> ConditionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ConditionProperty
condition, 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,
                            Key
"NextStep" Key -> DialogStateProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= DialogStateProperty
nextStep]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> ResponseSpecificationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Response" (ResponseSpecificationProperty -> (Key, Value))
-> Maybe ResponseSpecificationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ResponseSpecificationProperty
response]))}
instance JSON.ToJSON ConditionalBranchProperty where
  toJSON :: ConditionalBranchProperty -> Value
toJSON ConditionalBranchProperty {Maybe ResponseSpecificationProperty
()
Value Text
ConditionProperty
DialogStateProperty
haddock_workaround_ :: ConditionalBranchProperty -> ()
condition :: ConditionalBranchProperty -> ConditionProperty
name :: ConditionalBranchProperty -> Value Text
nextStep :: ConditionalBranchProperty -> DialogStateProperty
response :: ConditionalBranchProperty -> Maybe ResponseSpecificationProperty
haddock_workaround_ :: ()
condition :: ConditionProperty
name :: Value Text
nextStep :: DialogStateProperty
response :: Maybe ResponseSpecificationProperty
..}
    = [(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
"Condition" Key -> ConditionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ConditionProperty
condition, 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,
               Key
"NextStep" Key -> DialogStateProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= DialogStateProperty
nextStep]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> ResponseSpecificationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Response" (ResponseSpecificationProperty -> (Key, Value))
-> Maybe ResponseSpecificationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ResponseSpecificationProperty
response])))
instance Property "Condition" ConditionalBranchProperty where
  type PropertyType "Condition" ConditionalBranchProperty = ConditionProperty
  set :: PropertyType "Condition" ConditionalBranchProperty
-> ConditionalBranchProperty -> ConditionalBranchProperty
set PropertyType "Condition" ConditionalBranchProperty
newValue ConditionalBranchProperty {Maybe ResponseSpecificationProperty
()
Value Text
ConditionProperty
DialogStateProperty
haddock_workaround_ :: ConditionalBranchProperty -> ()
condition :: ConditionalBranchProperty -> ConditionProperty
name :: ConditionalBranchProperty -> Value Text
nextStep :: ConditionalBranchProperty -> DialogStateProperty
response :: ConditionalBranchProperty -> Maybe ResponseSpecificationProperty
haddock_workaround_ :: ()
condition :: ConditionProperty
name :: Value Text
nextStep :: DialogStateProperty
response :: Maybe ResponseSpecificationProperty
..}
    = ConditionalBranchProperty {condition :: ConditionProperty
condition = PropertyType "Condition" ConditionalBranchProperty
ConditionProperty
newValue, Maybe ResponseSpecificationProperty
()
Value Text
DialogStateProperty
haddock_workaround_ :: ()
name :: Value Text
nextStep :: DialogStateProperty
response :: Maybe ResponseSpecificationProperty
haddock_workaround_ :: ()
name :: Value Text
nextStep :: DialogStateProperty
response :: Maybe ResponseSpecificationProperty
..}
instance Property "Name" ConditionalBranchProperty where
  type PropertyType "Name" ConditionalBranchProperty = Value Prelude.Text
  set :: PropertyType "Name" ConditionalBranchProperty
-> ConditionalBranchProperty -> ConditionalBranchProperty
set PropertyType "Name" ConditionalBranchProperty
newValue ConditionalBranchProperty {Maybe ResponseSpecificationProperty
()
Value Text
ConditionProperty
DialogStateProperty
haddock_workaround_ :: ConditionalBranchProperty -> ()
condition :: ConditionalBranchProperty -> ConditionProperty
name :: ConditionalBranchProperty -> Value Text
nextStep :: ConditionalBranchProperty -> DialogStateProperty
response :: ConditionalBranchProperty -> Maybe ResponseSpecificationProperty
haddock_workaround_ :: ()
condition :: ConditionProperty
name :: Value Text
nextStep :: DialogStateProperty
response :: Maybe ResponseSpecificationProperty
..}
    = ConditionalBranchProperty {name :: Value Text
name = PropertyType "Name" ConditionalBranchProperty
Value Text
newValue, Maybe ResponseSpecificationProperty
()
ConditionProperty
DialogStateProperty
haddock_workaround_ :: ()
condition :: ConditionProperty
nextStep :: DialogStateProperty
response :: Maybe ResponseSpecificationProperty
haddock_workaround_ :: ()
condition :: ConditionProperty
nextStep :: DialogStateProperty
response :: Maybe ResponseSpecificationProperty
..}
instance Property "NextStep" ConditionalBranchProperty where
  type PropertyType "NextStep" ConditionalBranchProperty = DialogStateProperty
  set :: PropertyType "NextStep" ConditionalBranchProperty
-> ConditionalBranchProperty -> ConditionalBranchProperty
set PropertyType "NextStep" ConditionalBranchProperty
newValue ConditionalBranchProperty {Maybe ResponseSpecificationProperty
()
Value Text
ConditionProperty
DialogStateProperty
haddock_workaround_ :: ConditionalBranchProperty -> ()
condition :: ConditionalBranchProperty -> ConditionProperty
name :: ConditionalBranchProperty -> Value Text
nextStep :: ConditionalBranchProperty -> DialogStateProperty
response :: ConditionalBranchProperty -> Maybe ResponseSpecificationProperty
haddock_workaround_ :: ()
condition :: ConditionProperty
name :: Value Text
nextStep :: DialogStateProperty
response :: Maybe ResponseSpecificationProperty
..}
    = ConditionalBranchProperty {nextStep :: DialogStateProperty
nextStep = PropertyType "NextStep" ConditionalBranchProperty
DialogStateProperty
newValue, Maybe ResponseSpecificationProperty
()
Value Text
ConditionProperty
haddock_workaround_ :: ()
condition :: ConditionProperty
name :: Value Text
response :: Maybe ResponseSpecificationProperty
haddock_workaround_ :: ()
condition :: ConditionProperty
name :: Value Text
response :: Maybe ResponseSpecificationProperty
..}
instance Property "Response" ConditionalBranchProperty where
  type PropertyType "Response" ConditionalBranchProperty = ResponseSpecificationProperty
  set :: PropertyType "Response" ConditionalBranchProperty
-> ConditionalBranchProperty -> ConditionalBranchProperty
set PropertyType "Response" ConditionalBranchProperty
newValue ConditionalBranchProperty {Maybe ResponseSpecificationProperty
()
Value Text
ConditionProperty
DialogStateProperty
haddock_workaround_ :: ConditionalBranchProperty -> ()
condition :: ConditionalBranchProperty -> ConditionProperty
name :: ConditionalBranchProperty -> Value Text
nextStep :: ConditionalBranchProperty -> DialogStateProperty
response :: ConditionalBranchProperty -> Maybe ResponseSpecificationProperty
haddock_workaround_ :: ()
condition :: ConditionProperty
name :: Value Text
nextStep :: DialogStateProperty
response :: Maybe ResponseSpecificationProperty
..}
    = ConditionalBranchProperty {response :: Maybe ResponseSpecificationProperty
response = ResponseSpecificationProperty
-> Maybe ResponseSpecificationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Response" ConditionalBranchProperty
ResponseSpecificationProperty
newValue, ()
Value Text
ConditionProperty
DialogStateProperty
haddock_workaround_ :: ()
condition :: ConditionProperty
name :: Value Text
nextStep :: DialogStateProperty
haddock_workaround_ :: ()
condition :: ConditionProperty
name :: Value Text
nextStep :: DialogStateProperty
..}