module Stratosphere.Lex.Bot.DialogActionProperty (
        DialogActionProperty(..), mkDialogActionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DialogActionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-dialogaction.html>
    DialogActionProperty {DialogActionProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-dialogaction.html#cfn-lex-bot-dialogaction-slottoelicit>
                          DialogActionProperty -> Maybe (Value Text)
slotToElicit :: (Prelude.Maybe (Value Prelude.Text)),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-dialogaction.html#cfn-lex-bot-dialogaction-suppressnextmessage>
                          DialogActionProperty -> Maybe (Value Bool)
suppressNextMessage :: (Prelude.Maybe (Value Prelude.Bool)),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-dialogaction.html#cfn-lex-bot-dialogaction-type>
                          DialogActionProperty -> Value Text
type' :: (Value Prelude.Text)}
  deriving stock (DialogActionProperty -> DialogActionProperty -> Bool
(DialogActionProperty -> DialogActionProperty -> Bool)
-> (DialogActionProperty -> DialogActionProperty -> Bool)
-> Eq DialogActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DialogActionProperty -> DialogActionProperty -> Bool
== :: DialogActionProperty -> DialogActionProperty -> Bool
$c/= :: DialogActionProperty -> DialogActionProperty -> Bool
/= :: DialogActionProperty -> DialogActionProperty -> Bool
Prelude.Eq, Int -> DialogActionProperty -> ShowS
[DialogActionProperty] -> ShowS
DialogActionProperty -> String
(Int -> DialogActionProperty -> ShowS)
-> (DialogActionProperty -> String)
-> ([DialogActionProperty] -> ShowS)
-> Show DialogActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DialogActionProperty -> ShowS
showsPrec :: Int -> DialogActionProperty -> ShowS
$cshow :: DialogActionProperty -> String
show :: DialogActionProperty -> String
$cshowList :: [DialogActionProperty] -> ShowS
showList :: [DialogActionProperty] -> ShowS
Prelude.Show)
mkDialogActionProperty ::
  Value Prelude.Text -> DialogActionProperty
mkDialogActionProperty :: Value Text -> DialogActionProperty
mkDialogActionProperty Value Text
type'
  = DialogActionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), type' :: Value Text
type' = Value Text
type',
       slotToElicit :: Maybe (Value Text)
slotToElicit = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       suppressNextMessage :: Maybe (Value Bool)
suppressNextMessage = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DialogActionProperty where
  toResourceProperties :: DialogActionProperty -> ResourceProperties
toResourceProperties DialogActionProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DialogActionProperty -> ()
slotToElicit :: DialogActionProperty -> Maybe (Value Text)
suppressNextMessage :: DialogActionProperty -> Maybe (Value Bool)
type' :: DialogActionProperty -> Value Text
haddock_workaround_ :: ()
slotToElicit :: Maybe (Value Text)
suppressNextMessage :: Maybe (Value Bool)
type' :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Lex::Bot.DialogAction",
         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
"Type" 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
type']
                           ([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
"SlotToElicit" (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)
slotToElicit,
                               Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SuppressNextMessage" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
suppressNextMessage]))}
instance JSON.ToJSON DialogActionProperty where
  toJSON :: DialogActionProperty -> Value
toJSON DialogActionProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DialogActionProperty -> ()
slotToElicit :: DialogActionProperty -> Maybe (Value Text)
suppressNextMessage :: DialogActionProperty -> Maybe (Value Bool)
type' :: DialogActionProperty -> Value Text
haddock_workaround_ :: ()
slotToElicit :: Maybe (Value Text)
suppressNextMessage :: Maybe (Value Bool)
type' :: 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
"Type" 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
type']
              ([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
"SlotToElicit" (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)
slotToElicit,
                  Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SuppressNextMessage" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
suppressNextMessage])))
instance Property "SlotToElicit" DialogActionProperty where
  type PropertyType "SlotToElicit" DialogActionProperty = Value Prelude.Text
  set :: PropertyType "SlotToElicit" DialogActionProperty
-> DialogActionProperty -> DialogActionProperty
set PropertyType "SlotToElicit" DialogActionProperty
newValue DialogActionProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DialogActionProperty -> ()
slotToElicit :: DialogActionProperty -> Maybe (Value Text)
suppressNextMessage :: DialogActionProperty -> Maybe (Value Bool)
type' :: DialogActionProperty -> Value Text
haddock_workaround_ :: ()
slotToElicit :: Maybe (Value Text)
suppressNextMessage :: Maybe (Value Bool)
type' :: Value Text
..}
    = DialogActionProperty {slotToElicit :: Maybe (Value Text)
slotToElicit = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SlotToElicit" DialogActionProperty
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
suppressNextMessage :: Maybe (Value Bool)
type' :: Value Text
haddock_workaround_ :: ()
suppressNextMessage :: Maybe (Value Bool)
type' :: Value Text
..}
instance Property "SuppressNextMessage" DialogActionProperty where
  type PropertyType "SuppressNextMessage" DialogActionProperty = Value Prelude.Bool
  set :: PropertyType "SuppressNextMessage" DialogActionProperty
-> DialogActionProperty -> DialogActionProperty
set PropertyType "SuppressNextMessage" DialogActionProperty
newValue DialogActionProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DialogActionProperty -> ()
slotToElicit :: DialogActionProperty -> Maybe (Value Text)
suppressNextMessage :: DialogActionProperty -> Maybe (Value Bool)
type' :: DialogActionProperty -> Value Text
haddock_workaround_ :: ()
slotToElicit :: Maybe (Value Text)
suppressNextMessage :: Maybe (Value Bool)
type' :: Value Text
..}
    = DialogActionProperty
        {suppressNextMessage :: Maybe (Value Bool)
suppressNextMessage = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SuppressNextMessage" DialogActionProperty
Value Bool
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
slotToElicit :: Maybe (Value Text)
type' :: Value Text
haddock_workaround_ :: ()
slotToElicit :: Maybe (Value Text)
type' :: Value Text
..}
instance Property "Type" DialogActionProperty where
  type PropertyType "Type" DialogActionProperty = Value Prelude.Text
  set :: PropertyType "Type" DialogActionProperty
-> DialogActionProperty -> DialogActionProperty
set PropertyType "Type" DialogActionProperty
newValue DialogActionProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DialogActionProperty -> ()
slotToElicit :: DialogActionProperty -> Maybe (Value Text)
suppressNextMessage :: DialogActionProperty -> Maybe (Value Bool)
type' :: DialogActionProperty -> Value Text
haddock_workaround_ :: ()
slotToElicit :: Maybe (Value Text)
suppressNextMessage :: Maybe (Value Bool)
type' :: Value Text
..}
    = DialogActionProperty {type' :: Value Text
type' = PropertyType "Type" DialogActionProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
slotToElicit :: Maybe (Value Text)
suppressNextMessage :: Maybe (Value Bool)
haddock_workaround_ :: ()
slotToElicit :: Maybe (Value Text)
suppressNextMessage :: Maybe (Value Bool)
..}