{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.LexRuntime.Types.DialogAction
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.LexRuntime.Types.DialogAction where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.LexRuntime.Types.DialogActionType
import Amazonka.LexRuntime.Types.FulfillmentState
import Amazonka.LexRuntime.Types.MessageFormatType
import qualified Amazonka.Prelude as Prelude

-- | Describes the next action that the bot should take in its interaction
-- with the user and provides information about the context in which the
-- action takes place. Use the @DialogAction@ data type to set the
-- interaction to a specific state, or to return the interaction to a
-- previous state.
--
-- /See:/ 'newDialogAction' smart constructor.
data DialogAction = DialogAction'
  { -- | The fulfillment state of the intent. The possible values are:
    --
    -- -   @Failed@ - The Lambda function associated with the intent failed to
    --     fulfill the intent.
    --
    -- -   @Fulfilled@ - The intent has fulfilled by the Lambda function
    --     associated with the intent.
    --
    -- -   @ReadyForFulfillment@ - All of the information necessary for the
    --     intent is present and the intent ready to be fulfilled by the client
    --     application.
    DialogAction -> Maybe FulfillmentState
fulfillmentState :: Prelude.Maybe FulfillmentState,
    -- | The name of the intent.
    DialogAction -> Maybe Text
intentName :: Prelude.Maybe Prelude.Text,
    -- | The message that should be shown to the user. If you don\'t specify a
    -- message, Amazon Lex will use the message configured for the intent.
    DialogAction -> Maybe (Sensitive Text)
message :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | -   @PlainText@ - The message contains plain UTF-8 text.
    --
    -- -   @CustomPayload@ - The message is a custom format for the client.
    --
    -- -   @SSML@ - The message contains text formatted for voice output.
    --
    -- -   @Composite@ - The message contains an escaped JSON object containing
    --     one or more messages. For more information, see
    --     <https://docs.aws.amazon.com/lex/latest/dg/howitworks-manage-prompts.html Message Groups>.
    DialogAction -> Maybe MessageFormatType
messageFormat :: Prelude.Maybe MessageFormatType,
    -- | The name of the slot that should be elicited from the user.
    DialogAction -> Maybe Text
slotToElicit :: Prelude.Maybe Prelude.Text,
    -- | Map of the slots that have been gathered and their values.
    DialogAction -> Maybe (Sensitive (HashMap Text Text))
slots :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),
    -- | The next action that the bot should take in its interaction with the
    -- user. The possible values are:
    --
    -- -   @ConfirmIntent@ - The next action is asking the user if the intent
    --     is complete and ready to be fulfilled. This is a yes\/no question
    --     such as \"Place the order?\"
    --
    -- -   @Close@ - Indicates that the there will not be a response from the
    --     user. For example, the statement \"Your order has been placed\" does
    --     not require a response.
    --
    -- -   @Delegate@ - The next action is determined by Amazon Lex.
    --
    -- -   @ElicitIntent@ - The next action is to determine the intent that the
    --     user wants to fulfill.
    --
    -- -   @ElicitSlot@ - The next action is to elicit a slot value from the
    --     user.
    DialogAction -> DialogActionType
type' :: DialogActionType
  }
  deriving (DialogAction -> DialogAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DialogAction -> DialogAction -> Bool
$c/= :: DialogAction -> DialogAction -> Bool
== :: DialogAction -> DialogAction -> Bool
$c== :: DialogAction -> DialogAction -> Bool
Prelude.Eq, Int -> DialogAction -> ShowS
[DialogAction] -> ShowS
DialogAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DialogAction] -> ShowS
$cshowList :: [DialogAction] -> ShowS
show :: DialogAction -> String
$cshow :: DialogAction -> String
showsPrec :: Int -> DialogAction -> ShowS
$cshowsPrec :: Int -> DialogAction -> ShowS
Prelude.Show, forall x. Rep DialogAction x -> DialogAction
forall x. DialogAction -> Rep DialogAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DialogAction x -> DialogAction
$cfrom :: forall x. DialogAction -> Rep DialogAction x
Prelude.Generic)

-- |
-- Create a value of 'DialogAction' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'fulfillmentState', 'dialogAction_fulfillmentState' - The fulfillment state of the intent. The possible values are:
--
-- -   @Failed@ - The Lambda function associated with the intent failed to
--     fulfill the intent.
--
-- -   @Fulfilled@ - The intent has fulfilled by the Lambda function
--     associated with the intent.
--
-- -   @ReadyForFulfillment@ - All of the information necessary for the
--     intent is present and the intent ready to be fulfilled by the client
--     application.
--
-- 'intentName', 'dialogAction_intentName' - The name of the intent.
--
-- 'message', 'dialogAction_message' - The message that should be shown to the user. If you don\'t specify a
-- message, Amazon Lex will use the message configured for the intent.
--
-- 'messageFormat', 'dialogAction_messageFormat' - -   @PlainText@ - The message contains plain UTF-8 text.
--
-- -   @CustomPayload@ - The message is a custom format for the client.
--
-- -   @SSML@ - The message contains text formatted for voice output.
--
-- -   @Composite@ - The message contains an escaped JSON object containing
--     one or more messages. For more information, see
--     <https://docs.aws.amazon.com/lex/latest/dg/howitworks-manage-prompts.html Message Groups>.
--
-- 'slotToElicit', 'dialogAction_slotToElicit' - The name of the slot that should be elicited from the user.
--
-- 'slots', 'dialogAction_slots' - Map of the slots that have been gathered and their values.
--
-- 'type'', 'dialogAction_type' - The next action that the bot should take in its interaction with the
-- user. The possible values are:
--
-- -   @ConfirmIntent@ - The next action is asking the user if the intent
--     is complete and ready to be fulfilled. This is a yes\/no question
--     such as \"Place the order?\"
--
-- -   @Close@ - Indicates that the there will not be a response from the
--     user. For example, the statement \"Your order has been placed\" does
--     not require a response.
--
-- -   @Delegate@ - The next action is determined by Amazon Lex.
--
-- -   @ElicitIntent@ - The next action is to determine the intent that the
--     user wants to fulfill.
--
-- -   @ElicitSlot@ - The next action is to elicit a slot value from the
--     user.
newDialogAction ::
  -- | 'type''
  DialogActionType ->
  DialogAction
newDialogAction :: DialogActionType -> DialogAction
newDialogAction DialogActionType
pType_ =
  DialogAction'
    { $sel:fulfillmentState:DialogAction' :: Maybe FulfillmentState
fulfillmentState = forall a. Maybe a
Prelude.Nothing,
      $sel:intentName:DialogAction' :: Maybe Text
intentName = forall a. Maybe a
Prelude.Nothing,
      $sel:message:DialogAction' :: Maybe (Sensitive Text)
message = forall a. Maybe a
Prelude.Nothing,
      $sel:messageFormat:DialogAction' :: Maybe MessageFormatType
messageFormat = forall a. Maybe a
Prelude.Nothing,
      $sel:slotToElicit:DialogAction' :: Maybe Text
slotToElicit = forall a. Maybe a
Prelude.Nothing,
      $sel:slots:DialogAction' :: Maybe (Sensitive (HashMap Text Text))
slots = forall a. Maybe a
Prelude.Nothing,
      $sel:type':DialogAction' :: DialogActionType
type' = DialogActionType
pType_
    }

-- | The fulfillment state of the intent. The possible values are:
--
-- -   @Failed@ - The Lambda function associated with the intent failed to
--     fulfill the intent.
--
-- -   @Fulfilled@ - The intent has fulfilled by the Lambda function
--     associated with the intent.
--
-- -   @ReadyForFulfillment@ - All of the information necessary for the
--     intent is present and the intent ready to be fulfilled by the client
--     application.
dialogAction_fulfillmentState :: Lens.Lens' DialogAction (Prelude.Maybe FulfillmentState)
dialogAction_fulfillmentState :: Lens' DialogAction (Maybe FulfillmentState)
dialogAction_fulfillmentState = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DialogAction' {Maybe FulfillmentState
fulfillmentState :: Maybe FulfillmentState
$sel:fulfillmentState:DialogAction' :: DialogAction -> Maybe FulfillmentState
fulfillmentState} -> Maybe FulfillmentState
fulfillmentState) (\s :: DialogAction
s@DialogAction' {} Maybe FulfillmentState
a -> DialogAction
s {$sel:fulfillmentState:DialogAction' :: Maybe FulfillmentState
fulfillmentState = Maybe FulfillmentState
a} :: DialogAction)

-- | The name of the intent.
dialogAction_intentName :: Lens.Lens' DialogAction (Prelude.Maybe Prelude.Text)
dialogAction_intentName :: Lens' DialogAction (Maybe Text)
dialogAction_intentName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DialogAction' {Maybe Text
intentName :: Maybe Text
$sel:intentName:DialogAction' :: DialogAction -> Maybe Text
intentName} -> Maybe Text
intentName) (\s :: DialogAction
s@DialogAction' {} Maybe Text
a -> DialogAction
s {$sel:intentName:DialogAction' :: Maybe Text
intentName = Maybe Text
a} :: DialogAction)

-- | The message that should be shown to the user. If you don\'t specify a
-- message, Amazon Lex will use the message configured for the intent.
dialogAction_message :: Lens.Lens' DialogAction (Prelude.Maybe Prelude.Text)
dialogAction_message :: Lens' DialogAction (Maybe Text)
dialogAction_message = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DialogAction' {Maybe (Sensitive Text)
message :: Maybe (Sensitive Text)
$sel:message:DialogAction' :: DialogAction -> Maybe (Sensitive Text)
message} -> Maybe (Sensitive Text)
message) (\s :: DialogAction
s@DialogAction' {} Maybe (Sensitive Text)
a -> DialogAction
s {$sel:message:DialogAction' :: Maybe (Sensitive Text)
message = Maybe (Sensitive Text)
a} :: DialogAction) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | -   @PlainText@ - The message contains plain UTF-8 text.
--
-- -   @CustomPayload@ - The message is a custom format for the client.
--
-- -   @SSML@ - The message contains text formatted for voice output.
--
-- -   @Composite@ - The message contains an escaped JSON object containing
--     one or more messages. For more information, see
--     <https://docs.aws.amazon.com/lex/latest/dg/howitworks-manage-prompts.html Message Groups>.
dialogAction_messageFormat :: Lens.Lens' DialogAction (Prelude.Maybe MessageFormatType)
dialogAction_messageFormat :: Lens' DialogAction (Maybe MessageFormatType)
dialogAction_messageFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DialogAction' {Maybe MessageFormatType
messageFormat :: Maybe MessageFormatType
$sel:messageFormat:DialogAction' :: DialogAction -> Maybe MessageFormatType
messageFormat} -> Maybe MessageFormatType
messageFormat) (\s :: DialogAction
s@DialogAction' {} Maybe MessageFormatType
a -> DialogAction
s {$sel:messageFormat:DialogAction' :: Maybe MessageFormatType
messageFormat = Maybe MessageFormatType
a} :: DialogAction)

-- | The name of the slot that should be elicited from the user.
dialogAction_slotToElicit :: Lens.Lens' DialogAction (Prelude.Maybe Prelude.Text)
dialogAction_slotToElicit :: Lens' DialogAction (Maybe Text)
dialogAction_slotToElicit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DialogAction' {Maybe Text
slotToElicit :: Maybe Text
$sel:slotToElicit:DialogAction' :: DialogAction -> Maybe Text
slotToElicit} -> Maybe Text
slotToElicit) (\s :: DialogAction
s@DialogAction' {} Maybe Text
a -> DialogAction
s {$sel:slotToElicit:DialogAction' :: Maybe Text
slotToElicit = Maybe Text
a} :: DialogAction)

-- | Map of the slots that have been gathered and their values.
dialogAction_slots :: Lens.Lens' DialogAction (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
dialogAction_slots :: Lens' DialogAction (Maybe (HashMap Text Text))
dialogAction_slots = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DialogAction' {Maybe (Sensitive (HashMap Text Text))
slots :: Maybe (Sensitive (HashMap Text Text))
$sel:slots:DialogAction' :: DialogAction -> Maybe (Sensitive (HashMap Text Text))
slots} -> Maybe (Sensitive (HashMap Text Text))
slots) (\s :: DialogAction
s@DialogAction' {} Maybe (Sensitive (HashMap Text Text))
a -> DialogAction
s {$sel:slots:DialogAction' :: Maybe (Sensitive (HashMap Text Text))
slots = Maybe (Sensitive (HashMap Text Text))
a} :: DialogAction) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping (forall a. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)

-- | The next action that the bot should take in its interaction with the
-- user. The possible values are:
--
-- -   @ConfirmIntent@ - The next action is asking the user if the intent
--     is complete and ready to be fulfilled. This is a yes\/no question
--     such as \"Place the order?\"
--
-- -   @Close@ - Indicates that the there will not be a response from the
--     user. For example, the statement \"Your order has been placed\" does
--     not require a response.
--
-- -   @Delegate@ - The next action is determined by Amazon Lex.
--
-- -   @ElicitIntent@ - The next action is to determine the intent that the
--     user wants to fulfill.
--
-- -   @ElicitSlot@ - The next action is to elicit a slot value from the
--     user.
dialogAction_type :: Lens.Lens' DialogAction DialogActionType
dialogAction_type :: Lens' DialogAction DialogActionType
dialogAction_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DialogAction' {DialogActionType
type' :: DialogActionType
$sel:type':DialogAction' :: DialogAction -> DialogActionType
type'} -> DialogActionType
type') (\s :: DialogAction
s@DialogAction' {} DialogActionType
a -> DialogAction
s {$sel:type':DialogAction' :: DialogActionType
type' = DialogActionType
a} :: DialogAction)

instance Data.FromJSON DialogAction where
  parseJSON :: Value -> Parser DialogAction
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"DialogAction"
      ( \Object
x ->
          Maybe FulfillmentState
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe MessageFormatType
-> Maybe Text
-> Maybe (Sensitive (HashMap Text Text))
-> DialogActionType
-> DialogAction
DialogAction'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"fulfillmentState")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"intentName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"message")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"messageFormat")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"slotToElicit")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"slots" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"type")
      )

instance Prelude.Hashable DialogAction where
  hashWithSalt :: Int -> DialogAction -> Int
hashWithSalt Int
_salt DialogAction' {Maybe Text
Maybe (Sensitive Text)
Maybe (Sensitive (HashMap Text Text))
Maybe FulfillmentState
Maybe MessageFormatType
DialogActionType
type' :: DialogActionType
slots :: Maybe (Sensitive (HashMap Text Text))
slotToElicit :: Maybe Text
messageFormat :: Maybe MessageFormatType
message :: Maybe (Sensitive Text)
intentName :: Maybe Text
fulfillmentState :: Maybe FulfillmentState
$sel:type':DialogAction' :: DialogAction -> DialogActionType
$sel:slots:DialogAction' :: DialogAction -> Maybe (Sensitive (HashMap Text Text))
$sel:slotToElicit:DialogAction' :: DialogAction -> Maybe Text
$sel:messageFormat:DialogAction' :: DialogAction -> Maybe MessageFormatType
$sel:message:DialogAction' :: DialogAction -> Maybe (Sensitive Text)
$sel:intentName:DialogAction' :: DialogAction -> Maybe Text
$sel:fulfillmentState:DialogAction' :: DialogAction -> Maybe FulfillmentState
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FulfillmentState
fulfillmentState
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
intentName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
message
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MessageFormatType
messageFormat
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
slotToElicit
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive (HashMap Text Text))
slots
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DialogActionType
type'

instance Prelude.NFData DialogAction where
  rnf :: DialogAction -> ()
rnf DialogAction' {Maybe Text
Maybe (Sensitive Text)
Maybe (Sensitive (HashMap Text Text))
Maybe FulfillmentState
Maybe MessageFormatType
DialogActionType
type' :: DialogActionType
slots :: Maybe (Sensitive (HashMap Text Text))
slotToElicit :: Maybe Text
messageFormat :: Maybe MessageFormatType
message :: Maybe (Sensitive Text)
intentName :: Maybe Text
fulfillmentState :: Maybe FulfillmentState
$sel:type':DialogAction' :: DialogAction -> DialogActionType
$sel:slots:DialogAction' :: DialogAction -> Maybe (Sensitive (HashMap Text Text))
$sel:slotToElicit:DialogAction' :: DialogAction -> Maybe Text
$sel:messageFormat:DialogAction' :: DialogAction -> Maybe MessageFormatType
$sel:message:DialogAction' :: DialogAction -> Maybe (Sensitive Text)
$sel:intentName:DialogAction' :: DialogAction -> Maybe Text
$sel:fulfillmentState:DialogAction' :: DialogAction -> Maybe FulfillmentState
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe FulfillmentState
fulfillmentState
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
intentName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
message
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MessageFormatType
messageFormat
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
slotToElicit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive (HashMap Text Text))
slots
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DialogActionType
type'

instance Data.ToJSON DialogAction where
  toJSON :: DialogAction -> Value
toJSON DialogAction' {Maybe Text
Maybe (Sensitive Text)
Maybe (Sensitive (HashMap Text Text))
Maybe FulfillmentState
Maybe MessageFormatType
DialogActionType
type' :: DialogActionType
slots :: Maybe (Sensitive (HashMap Text Text))
slotToElicit :: Maybe Text
messageFormat :: Maybe MessageFormatType
message :: Maybe (Sensitive Text)
intentName :: Maybe Text
fulfillmentState :: Maybe FulfillmentState
$sel:type':DialogAction' :: DialogAction -> DialogActionType
$sel:slots:DialogAction' :: DialogAction -> Maybe (Sensitive (HashMap Text Text))
$sel:slotToElicit:DialogAction' :: DialogAction -> Maybe Text
$sel:messageFormat:DialogAction' :: DialogAction -> Maybe MessageFormatType
$sel:message:DialogAction' :: DialogAction -> Maybe (Sensitive Text)
$sel:intentName:DialogAction' :: DialogAction -> Maybe Text
$sel:fulfillmentState:DialogAction' :: DialogAction -> Maybe FulfillmentState
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"fulfillmentState" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FulfillmentState
fulfillmentState,
            (Key
"intentName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
intentName,
            (Key
"message" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
message,
            (Key
"messageFormat" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MessageFormatType
messageFormat,
            (Key
"slotToElicit" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
slotToElicit,
            (Key
"slots" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive (HashMap Text Text))
slots,
            forall a. a -> Maybe a
Prelude.Just (Key
"type" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= DialogActionType
type')
          ]
      )