module Stratosphere.Lex.Bot.PromptSpecificationProperty (
module Exports, PromptSpecificationProperty(..),
mkPromptSpecificationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Lex.Bot.MessageGroupProperty as Exports
import {-# SOURCE #-} Stratosphere.Lex.Bot.PromptAttemptSpecificationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PromptSpecificationProperty
=
PromptSpecificationProperty {PromptSpecificationProperty -> ()
haddock_workaround_ :: (),
PromptSpecificationProperty -> Maybe (Value Bool)
allowInterrupt :: (Prelude.Maybe (Value Prelude.Bool)),
PromptSpecificationProperty -> Value Integer
maxRetries :: (Value Prelude.Integer),
PromptSpecificationProperty -> [MessageGroupProperty]
messageGroupsList :: [MessageGroupProperty],
PromptSpecificationProperty -> Maybe (Value Text)
messageSelectionStrategy :: (Prelude.Maybe (Value Prelude.Text)),
PromptSpecificationProperty
-> Maybe (Map Text PromptAttemptSpecificationProperty)
promptAttemptsSpecification :: (Prelude.Maybe (Prelude.Map Prelude.Text PromptAttemptSpecificationProperty))}
deriving stock (PromptSpecificationProperty -> PromptSpecificationProperty -> Bool
(PromptSpecificationProperty
-> PromptSpecificationProperty -> Bool)
-> (PromptSpecificationProperty
-> PromptSpecificationProperty -> Bool)
-> Eq PromptSpecificationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PromptSpecificationProperty -> PromptSpecificationProperty -> Bool
== :: PromptSpecificationProperty -> PromptSpecificationProperty -> Bool
$c/= :: PromptSpecificationProperty -> PromptSpecificationProperty -> Bool
/= :: PromptSpecificationProperty -> PromptSpecificationProperty -> Bool
Prelude.Eq, Int -> PromptSpecificationProperty -> ShowS
[PromptSpecificationProperty] -> ShowS
PromptSpecificationProperty -> String
(Int -> PromptSpecificationProperty -> ShowS)
-> (PromptSpecificationProperty -> String)
-> ([PromptSpecificationProperty] -> ShowS)
-> Show PromptSpecificationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PromptSpecificationProperty -> ShowS
showsPrec :: Int -> PromptSpecificationProperty -> ShowS
$cshow :: PromptSpecificationProperty -> String
show :: PromptSpecificationProperty -> String
$cshowList :: [PromptSpecificationProperty] -> ShowS
showList :: [PromptSpecificationProperty] -> ShowS
Prelude.Show)
mkPromptSpecificationProperty ::
Value Prelude.Integer
-> [MessageGroupProperty] -> PromptSpecificationProperty
mkPromptSpecificationProperty :: Value Integer
-> [MessageGroupProperty] -> PromptSpecificationProperty
mkPromptSpecificationProperty Value Integer
maxRetries [MessageGroupProperty]
messageGroupsList
= PromptSpecificationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), maxRetries :: Value Integer
maxRetries = Value Integer
maxRetries,
messageGroupsList :: [MessageGroupProperty]
messageGroupsList = [MessageGroupProperty]
messageGroupsList,
allowInterrupt :: Maybe (Value Bool)
allowInterrupt = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
messageSelectionStrategy :: Maybe (Value Text)
messageSelectionStrategy = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
promptAttemptsSpecification :: Maybe (Map Text PromptAttemptSpecificationProperty)
promptAttemptsSpecification = Maybe (Map Text PromptAttemptSpecificationProperty)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PromptSpecificationProperty where
toResourceProperties :: PromptSpecificationProperty -> ResourceProperties
toResourceProperties PromptSpecificationProperty {[MessageGroupProperty]
Maybe (Map Text PromptAttemptSpecificationProperty)
Maybe (Value Bool)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: PromptSpecificationProperty -> ()
allowInterrupt :: PromptSpecificationProperty -> Maybe (Value Bool)
maxRetries :: PromptSpecificationProperty -> Value Integer
messageGroupsList :: PromptSpecificationProperty -> [MessageGroupProperty]
messageSelectionStrategy :: PromptSpecificationProperty -> Maybe (Value Text)
promptAttemptsSpecification :: PromptSpecificationProperty
-> Maybe (Map Text PromptAttemptSpecificationProperty)
haddock_workaround_ :: ()
allowInterrupt :: Maybe (Value Bool)
maxRetries :: Value Integer
messageGroupsList :: [MessageGroupProperty]
messageSelectionStrategy :: Maybe (Value Text)
promptAttemptsSpecification :: Maybe (Map Text PromptAttemptSpecificationProperty)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Lex::Bot.PromptSpecification",
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
"MaxRetries" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
maxRetries,
Key
"MessageGroupsList" Key -> [MessageGroupProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [MessageGroupProperty]
messageGroupsList]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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
"AllowInterrupt" (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)
allowInterrupt,
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
"MessageSelectionStrategy"
(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)
messageSelectionStrategy,
Key -> Map Text PromptAttemptSpecificationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PromptAttemptsSpecification"
(Map Text PromptAttemptSpecificationProperty -> (Key, Value))
-> Maybe (Map Text PromptAttemptSpecificationProperty)
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text PromptAttemptSpecificationProperty)
promptAttemptsSpecification]))}
instance JSON.ToJSON PromptSpecificationProperty where
toJSON :: PromptSpecificationProperty -> Value
toJSON PromptSpecificationProperty {[MessageGroupProperty]
Maybe (Map Text PromptAttemptSpecificationProperty)
Maybe (Value Bool)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: PromptSpecificationProperty -> ()
allowInterrupt :: PromptSpecificationProperty -> Maybe (Value Bool)
maxRetries :: PromptSpecificationProperty -> Value Integer
messageGroupsList :: PromptSpecificationProperty -> [MessageGroupProperty]
messageSelectionStrategy :: PromptSpecificationProperty -> Maybe (Value Text)
promptAttemptsSpecification :: PromptSpecificationProperty
-> Maybe (Map Text PromptAttemptSpecificationProperty)
haddock_workaround_ :: ()
allowInterrupt :: Maybe (Value Bool)
maxRetries :: Value Integer
messageGroupsList :: [MessageGroupProperty]
messageSelectionStrategy :: Maybe (Value Text)
promptAttemptsSpecification :: Maybe (Map Text PromptAttemptSpecificationProperty)
..}
= [(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
"MaxRetries" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
maxRetries,
Key
"MessageGroupsList" Key -> [MessageGroupProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [MessageGroupProperty]
messageGroupsList]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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
"AllowInterrupt" (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)
allowInterrupt,
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
"MessageSelectionStrategy"
(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)
messageSelectionStrategy,
Key -> Map Text PromptAttemptSpecificationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PromptAttemptsSpecification"
(Map Text PromptAttemptSpecificationProperty -> (Key, Value))
-> Maybe (Map Text PromptAttemptSpecificationProperty)
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text PromptAttemptSpecificationProperty)
promptAttemptsSpecification])))
instance Property "AllowInterrupt" PromptSpecificationProperty where
type PropertyType "AllowInterrupt" PromptSpecificationProperty = Value Prelude.Bool
set :: PropertyType "AllowInterrupt" PromptSpecificationProperty
-> PromptSpecificationProperty -> PromptSpecificationProperty
set PropertyType "AllowInterrupt" PromptSpecificationProperty
newValue PromptSpecificationProperty {[MessageGroupProperty]
Maybe (Map Text PromptAttemptSpecificationProperty)
Maybe (Value Bool)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: PromptSpecificationProperty -> ()
allowInterrupt :: PromptSpecificationProperty -> Maybe (Value Bool)
maxRetries :: PromptSpecificationProperty -> Value Integer
messageGroupsList :: PromptSpecificationProperty -> [MessageGroupProperty]
messageSelectionStrategy :: PromptSpecificationProperty -> Maybe (Value Text)
promptAttemptsSpecification :: PromptSpecificationProperty
-> Maybe (Map Text PromptAttemptSpecificationProperty)
haddock_workaround_ :: ()
allowInterrupt :: Maybe (Value Bool)
maxRetries :: Value Integer
messageGroupsList :: [MessageGroupProperty]
messageSelectionStrategy :: Maybe (Value Text)
promptAttemptsSpecification :: Maybe (Map Text PromptAttemptSpecificationProperty)
..}
= PromptSpecificationProperty
{allowInterrupt :: Maybe (Value Bool)
allowInterrupt = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AllowInterrupt" PromptSpecificationProperty
Value Bool
newValue, [MessageGroupProperty]
Maybe (Map Text PromptAttemptSpecificationProperty)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: ()
maxRetries :: Value Integer
messageGroupsList :: [MessageGroupProperty]
messageSelectionStrategy :: Maybe (Value Text)
promptAttemptsSpecification :: Maybe (Map Text PromptAttemptSpecificationProperty)
haddock_workaround_ :: ()
maxRetries :: Value Integer
messageGroupsList :: [MessageGroupProperty]
messageSelectionStrategy :: Maybe (Value Text)
promptAttemptsSpecification :: Maybe (Map Text PromptAttemptSpecificationProperty)
..}
instance Property "MaxRetries" PromptSpecificationProperty where
type PropertyType "MaxRetries" PromptSpecificationProperty = Value Prelude.Integer
set :: PropertyType "MaxRetries" PromptSpecificationProperty
-> PromptSpecificationProperty -> PromptSpecificationProperty
set PropertyType "MaxRetries" PromptSpecificationProperty
newValue PromptSpecificationProperty {[MessageGroupProperty]
Maybe (Map Text PromptAttemptSpecificationProperty)
Maybe (Value Bool)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: PromptSpecificationProperty -> ()
allowInterrupt :: PromptSpecificationProperty -> Maybe (Value Bool)
maxRetries :: PromptSpecificationProperty -> Value Integer
messageGroupsList :: PromptSpecificationProperty -> [MessageGroupProperty]
messageSelectionStrategy :: PromptSpecificationProperty -> Maybe (Value Text)
promptAttemptsSpecification :: PromptSpecificationProperty
-> Maybe (Map Text PromptAttemptSpecificationProperty)
haddock_workaround_ :: ()
allowInterrupt :: Maybe (Value Bool)
maxRetries :: Value Integer
messageGroupsList :: [MessageGroupProperty]
messageSelectionStrategy :: Maybe (Value Text)
promptAttemptsSpecification :: Maybe (Map Text PromptAttemptSpecificationProperty)
..}
= PromptSpecificationProperty {maxRetries :: Value Integer
maxRetries = PropertyType "MaxRetries" PromptSpecificationProperty
Value Integer
newValue, [MessageGroupProperty]
Maybe (Map Text PromptAttemptSpecificationProperty)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
allowInterrupt :: Maybe (Value Bool)
messageGroupsList :: [MessageGroupProperty]
messageSelectionStrategy :: Maybe (Value Text)
promptAttemptsSpecification :: Maybe (Map Text PromptAttemptSpecificationProperty)
haddock_workaround_ :: ()
allowInterrupt :: Maybe (Value Bool)
messageGroupsList :: [MessageGroupProperty]
messageSelectionStrategy :: Maybe (Value Text)
promptAttemptsSpecification :: Maybe (Map Text PromptAttemptSpecificationProperty)
..}
instance Property "MessageGroupsList" PromptSpecificationProperty where
type PropertyType "MessageGroupsList" PromptSpecificationProperty = [MessageGroupProperty]
set :: PropertyType "MessageGroupsList" PromptSpecificationProperty
-> PromptSpecificationProperty -> PromptSpecificationProperty
set PropertyType "MessageGroupsList" PromptSpecificationProperty
newValue PromptSpecificationProperty {[MessageGroupProperty]
Maybe (Map Text PromptAttemptSpecificationProperty)
Maybe (Value Bool)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: PromptSpecificationProperty -> ()
allowInterrupt :: PromptSpecificationProperty -> Maybe (Value Bool)
maxRetries :: PromptSpecificationProperty -> Value Integer
messageGroupsList :: PromptSpecificationProperty -> [MessageGroupProperty]
messageSelectionStrategy :: PromptSpecificationProperty -> Maybe (Value Text)
promptAttemptsSpecification :: PromptSpecificationProperty
-> Maybe (Map Text PromptAttemptSpecificationProperty)
haddock_workaround_ :: ()
allowInterrupt :: Maybe (Value Bool)
maxRetries :: Value Integer
messageGroupsList :: [MessageGroupProperty]
messageSelectionStrategy :: Maybe (Value Text)
promptAttemptsSpecification :: Maybe (Map Text PromptAttemptSpecificationProperty)
..}
= PromptSpecificationProperty {messageGroupsList :: [MessageGroupProperty]
messageGroupsList = [MessageGroupProperty]
PropertyType "MessageGroupsList" PromptSpecificationProperty
newValue, Maybe (Map Text PromptAttemptSpecificationProperty)
Maybe (Value Bool)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: ()
allowInterrupt :: Maybe (Value Bool)
maxRetries :: Value Integer
messageSelectionStrategy :: Maybe (Value Text)
promptAttemptsSpecification :: Maybe (Map Text PromptAttemptSpecificationProperty)
haddock_workaround_ :: ()
allowInterrupt :: Maybe (Value Bool)
maxRetries :: Value Integer
messageSelectionStrategy :: Maybe (Value Text)
promptAttemptsSpecification :: Maybe (Map Text PromptAttemptSpecificationProperty)
..}
instance Property "MessageSelectionStrategy" PromptSpecificationProperty where
type PropertyType "MessageSelectionStrategy" PromptSpecificationProperty = Value Prelude.Text
set :: PropertyType "MessageSelectionStrategy" PromptSpecificationProperty
-> PromptSpecificationProperty -> PromptSpecificationProperty
set PropertyType "MessageSelectionStrategy" PromptSpecificationProperty
newValue PromptSpecificationProperty {[MessageGroupProperty]
Maybe (Map Text PromptAttemptSpecificationProperty)
Maybe (Value Bool)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: PromptSpecificationProperty -> ()
allowInterrupt :: PromptSpecificationProperty -> Maybe (Value Bool)
maxRetries :: PromptSpecificationProperty -> Value Integer
messageGroupsList :: PromptSpecificationProperty -> [MessageGroupProperty]
messageSelectionStrategy :: PromptSpecificationProperty -> Maybe (Value Text)
promptAttemptsSpecification :: PromptSpecificationProperty
-> Maybe (Map Text PromptAttemptSpecificationProperty)
haddock_workaround_ :: ()
allowInterrupt :: Maybe (Value Bool)
maxRetries :: Value Integer
messageGroupsList :: [MessageGroupProperty]
messageSelectionStrategy :: Maybe (Value Text)
promptAttemptsSpecification :: Maybe (Map Text PromptAttemptSpecificationProperty)
..}
= PromptSpecificationProperty
{messageSelectionStrategy :: Maybe (Value Text)
messageSelectionStrategy = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MessageSelectionStrategy" PromptSpecificationProperty
Value Text
newValue, [MessageGroupProperty]
Maybe (Map Text PromptAttemptSpecificationProperty)
Maybe (Value Bool)
()
Value Integer
haddock_workaround_ :: ()
allowInterrupt :: Maybe (Value Bool)
maxRetries :: Value Integer
messageGroupsList :: [MessageGroupProperty]
promptAttemptsSpecification :: Maybe (Map Text PromptAttemptSpecificationProperty)
haddock_workaround_ :: ()
allowInterrupt :: Maybe (Value Bool)
maxRetries :: Value Integer
messageGroupsList :: [MessageGroupProperty]
promptAttemptsSpecification :: Maybe (Map Text PromptAttemptSpecificationProperty)
..}
instance Property "PromptAttemptsSpecification" PromptSpecificationProperty where
type PropertyType "PromptAttemptsSpecification" PromptSpecificationProperty = Prelude.Map Prelude.Text PromptAttemptSpecificationProperty
set :: PropertyType
"PromptAttemptsSpecification" PromptSpecificationProperty
-> PromptSpecificationProperty -> PromptSpecificationProperty
set PropertyType
"PromptAttemptsSpecification" PromptSpecificationProperty
newValue PromptSpecificationProperty {[MessageGroupProperty]
Maybe (Map Text PromptAttemptSpecificationProperty)
Maybe (Value Bool)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: PromptSpecificationProperty -> ()
allowInterrupt :: PromptSpecificationProperty -> Maybe (Value Bool)
maxRetries :: PromptSpecificationProperty -> Value Integer
messageGroupsList :: PromptSpecificationProperty -> [MessageGroupProperty]
messageSelectionStrategy :: PromptSpecificationProperty -> Maybe (Value Text)
promptAttemptsSpecification :: PromptSpecificationProperty
-> Maybe (Map Text PromptAttemptSpecificationProperty)
haddock_workaround_ :: ()
allowInterrupt :: Maybe (Value Bool)
maxRetries :: Value Integer
messageGroupsList :: [MessageGroupProperty]
messageSelectionStrategy :: Maybe (Value Text)
promptAttemptsSpecification :: Maybe (Map Text PromptAttemptSpecificationProperty)
..}
= PromptSpecificationProperty
{promptAttemptsSpecification :: Maybe (Map Text PromptAttemptSpecificationProperty)
promptAttemptsSpecification = Map Text PromptAttemptSpecificationProperty
-> Maybe (Map Text PromptAttemptSpecificationProperty)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text PromptAttemptSpecificationProperty
PropertyType
"PromptAttemptsSpecification" PromptSpecificationProperty
newValue, [MessageGroupProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: ()
allowInterrupt :: Maybe (Value Bool)
maxRetries :: Value Integer
messageGroupsList :: [MessageGroupProperty]
messageSelectionStrategy :: Maybe (Value Text)
haddock_workaround_ :: ()
allowInterrupt :: Maybe (Value Bool)
maxRetries :: Value Integer
messageGroupsList :: [MessageGroupProperty]
messageSelectionStrategy :: Maybe (Value Text)
..}