module Stratosphere.Lex.Bot.DefaultConditionalBranchProperty (
module Exports, DefaultConditionalBranchProperty(..),
mkDefaultConditionalBranchProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Lex.Bot.DialogStateProperty as Exports
import {-# SOURCE #-} Stratosphere.Lex.Bot.ResponseSpecificationProperty as Exports
import Stratosphere.ResourceProperties
data DefaultConditionalBranchProperty
=
DefaultConditionalBranchProperty {DefaultConditionalBranchProperty -> ()
haddock_workaround_ :: (),
DefaultConditionalBranchProperty -> Maybe DialogStateProperty
nextStep :: (Prelude.Maybe DialogStateProperty),
DefaultConditionalBranchProperty
-> Maybe ResponseSpecificationProperty
response :: (Prelude.Maybe ResponseSpecificationProperty)}
deriving stock (DefaultConditionalBranchProperty
-> DefaultConditionalBranchProperty -> Bool
(DefaultConditionalBranchProperty
-> DefaultConditionalBranchProperty -> Bool)
-> (DefaultConditionalBranchProperty
-> DefaultConditionalBranchProperty -> Bool)
-> Eq DefaultConditionalBranchProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DefaultConditionalBranchProperty
-> DefaultConditionalBranchProperty -> Bool
== :: DefaultConditionalBranchProperty
-> DefaultConditionalBranchProperty -> Bool
$c/= :: DefaultConditionalBranchProperty
-> DefaultConditionalBranchProperty -> Bool
/= :: DefaultConditionalBranchProperty
-> DefaultConditionalBranchProperty -> Bool
Prelude.Eq, Int -> DefaultConditionalBranchProperty -> ShowS
[DefaultConditionalBranchProperty] -> ShowS
DefaultConditionalBranchProperty -> String
(Int -> DefaultConditionalBranchProperty -> ShowS)
-> (DefaultConditionalBranchProperty -> String)
-> ([DefaultConditionalBranchProperty] -> ShowS)
-> Show DefaultConditionalBranchProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DefaultConditionalBranchProperty -> ShowS
showsPrec :: Int -> DefaultConditionalBranchProperty -> ShowS
$cshow :: DefaultConditionalBranchProperty -> String
show :: DefaultConditionalBranchProperty -> String
$cshowList :: [DefaultConditionalBranchProperty] -> ShowS
showList :: [DefaultConditionalBranchProperty] -> ShowS
Prelude.Show)
mkDefaultConditionalBranchProperty ::
DefaultConditionalBranchProperty
mkDefaultConditionalBranchProperty :: DefaultConditionalBranchProperty
mkDefaultConditionalBranchProperty
= DefaultConditionalBranchProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), nextStep :: Maybe DialogStateProperty
nextStep = Maybe DialogStateProperty
forall a. Maybe a
Prelude.Nothing,
response :: Maybe ResponseSpecificationProperty
response = Maybe ResponseSpecificationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DefaultConditionalBranchProperty where
toResourceProperties :: DefaultConditionalBranchProperty -> ResourceProperties
toResourceProperties DefaultConditionalBranchProperty {Maybe ResponseSpecificationProperty
Maybe DialogStateProperty
()
haddock_workaround_ :: DefaultConditionalBranchProperty -> ()
nextStep :: DefaultConditionalBranchProperty -> Maybe DialogStateProperty
response :: DefaultConditionalBranchProperty
-> Maybe ResponseSpecificationProperty
haddock_workaround_ :: ()
nextStep :: Maybe DialogStateProperty
response :: Maybe ResponseSpecificationProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Lex::Bot.DefaultConditionalBranch",
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 -> DialogStateProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NextStep" (DialogStateProperty -> (Key, Value))
-> Maybe DialogStateProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DialogStateProperty
nextStep,
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 DefaultConditionalBranchProperty where
toJSON :: DefaultConditionalBranchProperty -> Value
toJSON DefaultConditionalBranchProperty {Maybe ResponseSpecificationProperty
Maybe DialogStateProperty
()
haddock_workaround_ :: DefaultConditionalBranchProperty -> ()
nextStep :: DefaultConditionalBranchProperty -> Maybe DialogStateProperty
response :: DefaultConditionalBranchProperty
-> Maybe ResponseSpecificationProperty
haddock_workaround_ :: ()
nextStep :: Maybe DialogStateProperty
response :: Maybe ResponseSpecificationProperty
..}
= [(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 -> DialogStateProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NextStep" (DialogStateProperty -> (Key, Value))
-> Maybe DialogStateProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DialogStateProperty
nextStep,
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 "NextStep" DefaultConditionalBranchProperty where
type PropertyType "NextStep" DefaultConditionalBranchProperty = DialogStateProperty
set :: PropertyType "NextStep" DefaultConditionalBranchProperty
-> DefaultConditionalBranchProperty
-> DefaultConditionalBranchProperty
set PropertyType "NextStep" DefaultConditionalBranchProperty
newValue DefaultConditionalBranchProperty {Maybe ResponseSpecificationProperty
Maybe DialogStateProperty
()
haddock_workaround_ :: DefaultConditionalBranchProperty -> ()
nextStep :: DefaultConditionalBranchProperty -> Maybe DialogStateProperty
response :: DefaultConditionalBranchProperty
-> Maybe ResponseSpecificationProperty
haddock_workaround_ :: ()
nextStep :: Maybe DialogStateProperty
response :: Maybe ResponseSpecificationProperty
..}
= DefaultConditionalBranchProperty
{nextStep :: Maybe DialogStateProperty
nextStep = DialogStateProperty -> Maybe DialogStateProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NextStep" DefaultConditionalBranchProperty
DialogStateProperty
newValue, Maybe ResponseSpecificationProperty
()
haddock_workaround_ :: ()
response :: Maybe ResponseSpecificationProperty
haddock_workaround_ :: ()
response :: Maybe ResponseSpecificationProperty
..}
instance Property "Response" DefaultConditionalBranchProperty where
type PropertyType "Response" DefaultConditionalBranchProperty = ResponseSpecificationProperty
set :: PropertyType "Response" DefaultConditionalBranchProperty
-> DefaultConditionalBranchProperty
-> DefaultConditionalBranchProperty
set PropertyType "Response" DefaultConditionalBranchProperty
newValue DefaultConditionalBranchProperty {Maybe ResponseSpecificationProperty
Maybe DialogStateProperty
()
haddock_workaround_ :: DefaultConditionalBranchProperty -> ()
nextStep :: DefaultConditionalBranchProperty -> Maybe DialogStateProperty
response :: DefaultConditionalBranchProperty
-> Maybe ResponseSpecificationProperty
haddock_workaround_ :: ()
nextStep :: Maybe DialogStateProperty
response :: Maybe ResponseSpecificationProperty
..}
= DefaultConditionalBranchProperty
{response :: Maybe ResponseSpecificationProperty
response = ResponseSpecificationProperty
-> Maybe ResponseSpecificationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Response" DefaultConditionalBranchProperty
ResponseSpecificationProperty
newValue, Maybe DialogStateProperty
()
haddock_workaround_ :: ()
nextStep :: Maybe DialogStateProperty
haddock_workaround_ :: ()
nextStep :: Maybe DialogStateProperty
..}