-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Amazon Lex Runtime Service SDK.
--
-- Derived from API version 2016-11-28 of the AWS service
-- descriptions, licensed under Apache 2.0.
--
-- The types from this library are intended to be used with
-- amazonka, which provides mechanisms for specifying AuthN/AuthZ
-- information, sending requests, and receiving responses.
--
-- It is recommended to use generic lenses or optics from packages such
-- as generic-lens or optics to modify optional fields and
-- deconstruct responses.
--
-- Generated lenses can be found in Amazonka.LexRuntime.Lens and
-- are suitable for use with a lens package such as lens or
-- lens-family-core.
--
-- See Amazonka.LexRuntime and the AWS documentation to get
-- started.
@package amazonka-lex-runtime
@version 2.0
module Amazonka.LexRuntime.Types.ActiveContextTimeToLive
-- | The length of time or number of turns that a context remains active.
--
-- See: newActiveContextTimeToLive smart constructor.
data ActiveContextTimeToLive
ActiveContextTimeToLive' :: Maybe Natural -> Maybe Natural -> ActiveContextTimeToLive
-- | The number of seconds that the context should be active after it is
-- first sent in a PostContent or PostText response.
-- You can set the value between 5 and 86,400 seconds (24 hours).
[$sel:timeToLiveInSeconds:ActiveContextTimeToLive'] :: ActiveContextTimeToLive -> Maybe Natural
-- | The number of conversation turns that the context should be active. A
-- conversation turn is one PostContent or PostText
-- request and the corresponding response from Amazon Lex.
[$sel:turnsToLive:ActiveContextTimeToLive'] :: ActiveContextTimeToLive -> Maybe Natural
-- | Create a value of ActiveContextTimeToLive with all optional
-- fields omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:timeToLiveInSeconds:ActiveContextTimeToLive',
-- activeContextTimeToLive_timeToLiveInSeconds - The number of
-- seconds that the context should be active after it is first sent in a
-- PostContent or PostText response. You can set the
-- value between 5 and 86,400 seconds (24 hours).
--
-- $sel:turnsToLive:ActiveContextTimeToLive',
-- activeContextTimeToLive_turnsToLive - The number of
-- conversation turns that the context should be active. A conversation
-- turn is one PostContent or PostText request and the
-- corresponding response from Amazon Lex.
newActiveContextTimeToLive :: ActiveContextTimeToLive
-- | The number of seconds that the context should be active after it is
-- first sent in a PostContent or PostText response.
-- You can set the value between 5 and 86,400 seconds (24 hours).
activeContextTimeToLive_timeToLiveInSeconds :: Lens' ActiveContextTimeToLive (Maybe Natural)
-- | The number of conversation turns that the context should be active. A
-- conversation turn is one PostContent or PostText
-- request and the corresponding response from Amazon Lex.
activeContextTimeToLive_turnsToLive :: Lens' ActiveContextTimeToLive (Maybe Natural)
instance GHC.Generics.Generic Amazonka.LexRuntime.Types.ActiveContextTimeToLive.ActiveContextTimeToLive
instance GHC.Show.Show Amazonka.LexRuntime.Types.ActiveContextTimeToLive.ActiveContextTimeToLive
instance GHC.Read.Read Amazonka.LexRuntime.Types.ActiveContextTimeToLive.ActiveContextTimeToLive
instance GHC.Classes.Eq Amazonka.LexRuntime.Types.ActiveContextTimeToLive.ActiveContextTimeToLive
instance Data.Aeson.Types.FromJSON.FromJSON Amazonka.LexRuntime.Types.ActiveContextTimeToLive.ActiveContextTimeToLive
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.Types.ActiveContextTimeToLive.ActiveContextTimeToLive
instance Control.DeepSeq.NFData Amazonka.LexRuntime.Types.ActiveContextTimeToLive.ActiveContextTimeToLive
instance Data.Aeson.Types.ToJSON.ToJSON Amazonka.LexRuntime.Types.ActiveContextTimeToLive.ActiveContextTimeToLive
module Amazonka.LexRuntime.Types.ActiveContext
-- | A context is a variable that contains information about the current
-- state of the conversation between a user and Amazon Lex. Context can
-- be set automatically by Amazon Lex when an intent is fulfilled, or it
-- can be set at runtime using the PutContent, PutText,
-- or PutSession operation.
--
-- See: newActiveContext smart constructor.
data ActiveContext
ActiveContext' :: Text -> ActiveContextTimeToLive -> HashMap Text (Sensitive Text) -> ActiveContext
-- | The name of the context.
[$sel:name:ActiveContext'] :: ActiveContext -> Text
-- | The length of time or number of turns that a context remains active.
[$sel:timeToLive:ActiveContext'] :: ActiveContext -> ActiveContextTimeToLive
-- | State variables for the current context. You can use these values as
-- default values for slots in subsequent events.
[$sel:parameters:ActiveContext'] :: ActiveContext -> HashMap Text (Sensitive Text)
-- | Create a value of ActiveContext with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:name:ActiveContext', activeContext_name - The name
-- of the context.
--
-- $sel:timeToLive:ActiveContext', activeContext_timeToLive
-- - The length of time or number of turns that a context remains active.
--
-- $sel:parameters:ActiveContext', activeContext_parameters
-- - State variables for the current context. You can use these values as
-- default values for slots in subsequent events.
newActiveContext :: Text -> ActiveContextTimeToLive -> ActiveContext
-- | The name of the context.
activeContext_name :: Lens' ActiveContext Text
-- | The length of time or number of turns that a context remains active.
activeContext_timeToLive :: Lens' ActiveContext ActiveContextTimeToLive
-- | State variables for the current context. You can use these values as
-- default values for slots in subsequent events.
activeContext_parameters :: Lens' ActiveContext (HashMap Text Text)
instance GHC.Generics.Generic Amazonka.LexRuntime.Types.ActiveContext.ActiveContext
instance GHC.Show.Show Amazonka.LexRuntime.Types.ActiveContext.ActiveContext
instance GHC.Classes.Eq Amazonka.LexRuntime.Types.ActiveContext.ActiveContext
instance Data.Aeson.Types.FromJSON.FromJSON Amazonka.LexRuntime.Types.ActiveContext.ActiveContext
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.Types.ActiveContext.ActiveContext
instance Control.DeepSeq.NFData Amazonka.LexRuntime.Types.ActiveContext.ActiveContext
instance Data.Aeson.Types.ToJSON.ToJSON Amazonka.LexRuntime.Types.ActiveContext.ActiveContext
module Amazonka.LexRuntime.Types.Button
-- | Represents an option to be shown on the client platform (Facebook,
-- Slack, etc.)
--
-- See: newButton smart constructor.
data Button
Button' :: Text -> Text -> Button
-- | Text that is visible to the user on the button.
[$sel:text:Button'] :: Button -> Text
-- | The value sent to Amazon Lex when a user chooses the button. For
-- example, consider button text "NYC." When the user chooses the button,
-- the value sent can be "New York City."
[$sel:value:Button'] :: Button -> Text
-- | Create a value of Button with all optional fields omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:text:Button', button_text - Text that is visible to
-- the user on the button.
--
-- $sel:value:Button', button_value - The value sent to
-- Amazon Lex when a user chooses the button. For example, consider
-- button text "NYC." When the user chooses the button, the value sent
-- can be "New York City."
newButton :: Text -> Text -> Button
-- | Text that is visible to the user on the button.
button_text :: Lens' Button Text
-- | The value sent to Amazon Lex when a user chooses the button. For
-- example, consider button text "NYC." When the user chooses the button,
-- the value sent can be "New York City."
button_value :: Lens' Button Text
instance GHC.Generics.Generic Amazonka.LexRuntime.Types.Button.Button
instance GHC.Show.Show Amazonka.LexRuntime.Types.Button.Button
instance GHC.Read.Read Amazonka.LexRuntime.Types.Button.Button
instance GHC.Classes.Eq Amazonka.LexRuntime.Types.Button.Button
instance Data.Aeson.Types.FromJSON.FromJSON Amazonka.LexRuntime.Types.Button.Button
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.Types.Button.Button
instance Control.DeepSeq.NFData Amazonka.LexRuntime.Types.Button.Button
module Amazonka.LexRuntime.Types.ConfirmationStatus
newtype ConfirmationStatus
ConfirmationStatus' :: Text -> ConfirmationStatus
[fromConfirmationStatus] :: ConfirmationStatus -> Text
pattern ConfirmationStatus_Confirmed :: ConfirmationStatus
pattern ConfirmationStatus_Denied :: ConfirmationStatus
pattern ConfirmationStatus_None :: ConfirmationStatus
instance Amazonka.Data.XML.ToXML Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
instance Amazonka.Data.XML.FromXML Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
instance Data.Aeson.Types.ToJSON.ToJSONKey Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
instance Data.Aeson.Types.ToJSON.ToJSON Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
instance Data.Aeson.Types.FromJSON.FromJSONKey Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
instance Data.Aeson.Types.FromJSON.FromJSON Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
instance Amazonka.Data.Query.ToQuery Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
instance Amazonka.Data.Headers.ToHeader Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
instance Amazonka.Data.Log.ToLog Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
instance Amazonka.Data.ByteString.ToByteString Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
instance Amazonka.Data.Text.ToText Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
instance Amazonka.Data.Text.FromText Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
instance Control.DeepSeq.NFData Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
instance GHC.Generics.Generic Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
instance GHC.Classes.Ord Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
instance GHC.Classes.Eq Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
instance GHC.Read.Read Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
instance GHC.Show.Show Amazonka.LexRuntime.Types.ConfirmationStatus.ConfirmationStatus
module Amazonka.LexRuntime.Types.ContentType
newtype ContentType
ContentType' :: Text -> ContentType
[fromContentType] :: ContentType -> Text
pattern ContentType_Application_vnd_amazonaws_card_generic :: ContentType
instance Amazonka.Data.XML.ToXML Amazonka.LexRuntime.Types.ContentType.ContentType
instance Amazonka.Data.XML.FromXML Amazonka.LexRuntime.Types.ContentType.ContentType
instance Data.Aeson.Types.ToJSON.ToJSONKey Amazonka.LexRuntime.Types.ContentType.ContentType
instance Data.Aeson.Types.ToJSON.ToJSON Amazonka.LexRuntime.Types.ContentType.ContentType
instance Data.Aeson.Types.FromJSON.FromJSONKey Amazonka.LexRuntime.Types.ContentType.ContentType
instance Data.Aeson.Types.FromJSON.FromJSON Amazonka.LexRuntime.Types.ContentType.ContentType
instance Amazonka.Data.Query.ToQuery Amazonka.LexRuntime.Types.ContentType.ContentType
instance Amazonka.Data.Headers.ToHeader Amazonka.LexRuntime.Types.ContentType.ContentType
instance Amazonka.Data.Log.ToLog Amazonka.LexRuntime.Types.ContentType.ContentType
instance Amazonka.Data.ByteString.ToByteString Amazonka.LexRuntime.Types.ContentType.ContentType
instance Amazonka.Data.Text.ToText Amazonka.LexRuntime.Types.ContentType.ContentType
instance Amazonka.Data.Text.FromText Amazonka.LexRuntime.Types.ContentType.ContentType
instance Control.DeepSeq.NFData Amazonka.LexRuntime.Types.ContentType.ContentType
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.Types.ContentType.ContentType
instance GHC.Generics.Generic Amazonka.LexRuntime.Types.ContentType.ContentType
instance GHC.Classes.Ord Amazonka.LexRuntime.Types.ContentType.ContentType
instance GHC.Classes.Eq Amazonka.LexRuntime.Types.ContentType.ContentType
instance GHC.Read.Read Amazonka.LexRuntime.Types.ContentType.ContentType
instance GHC.Show.Show Amazonka.LexRuntime.Types.ContentType.ContentType
module Amazonka.LexRuntime.Types.DialogActionType
newtype DialogActionType
DialogActionType' :: Text -> DialogActionType
[fromDialogActionType] :: DialogActionType -> Text
pattern DialogActionType_Close :: DialogActionType
pattern DialogActionType_ConfirmIntent :: DialogActionType
pattern DialogActionType_Delegate :: DialogActionType
pattern DialogActionType_ElicitIntent :: DialogActionType
pattern DialogActionType_ElicitSlot :: DialogActionType
instance Amazonka.Data.XML.ToXML Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
instance Amazonka.Data.XML.FromXML Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
instance Data.Aeson.Types.ToJSON.ToJSONKey Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
instance Data.Aeson.Types.ToJSON.ToJSON Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
instance Data.Aeson.Types.FromJSON.FromJSONKey Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
instance Data.Aeson.Types.FromJSON.FromJSON Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
instance Amazonka.Data.Query.ToQuery Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
instance Amazonka.Data.Headers.ToHeader Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
instance Amazonka.Data.Log.ToLog Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
instance Amazonka.Data.ByteString.ToByteString Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
instance Amazonka.Data.Text.ToText Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
instance Amazonka.Data.Text.FromText Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
instance Control.DeepSeq.NFData Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
instance GHC.Generics.Generic Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
instance GHC.Classes.Ord Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
instance GHC.Classes.Eq Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
instance GHC.Read.Read Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
instance GHC.Show.Show Amazonka.LexRuntime.Types.DialogActionType.DialogActionType
module Amazonka.LexRuntime.Types.DialogState
newtype DialogState
DialogState' :: Text -> DialogState
[fromDialogState] :: DialogState -> Text
pattern DialogState_ConfirmIntent :: DialogState
pattern DialogState_ElicitIntent :: DialogState
pattern DialogState_ElicitSlot :: DialogState
pattern DialogState_Failed :: DialogState
pattern DialogState_Fulfilled :: DialogState
pattern DialogState_ReadyForFulfillment :: DialogState
instance Amazonka.Data.XML.ToXML Amazonka.LexRuntime.Types.DialogState.DialogState
instance Amazonka.Data.XML.FromXML Amazonka.LexRuntime.Types.DialogState.DialogState
instance Data.Aeson.Types.ToJSON.ToJSONKey Amazonka.LexRuntime.Types.DialogState.DialogState
instance Data.Aeson.Types.ToJSON.ToJSON Amazonka.LexRuntime.Types.DialogState.DialogState
instance Data.Aeson.Types.FromJSON.FromJSONKey Amazonka.LexRuntime.Types.DialogState.DialogState
instance Data.Aeson.Types.FromJSON.FromJSON Amazonka.LexRuntime.Types.DialogState.DialogState
instance Amazonka.Data.Query.ToQuery Amazonka.LexRuntime.Types.DialogState.DialogState
instance Amazonka.Data.Headers.ToHeader Amazonka.LexRuntime.Types.DialogState.DialogState
instance Amazonka.Data.Log.ToLog Amazonka.LexRuntime.Types.DialogState.DialogState
instance Amazonka.Data.ByteString.ToByteString Amazonka.LexRuntime.Types.DialogState.DialogState
instance Amazonka.Data.Text.ToText Amazonka.LexRuntime.Types.DialogState.DialogState
instance Amazonka.Data.Text.FromText Amazonka.LexRuntime.Types.DialogState.DialogState
instance Control.DeepSeq.NFData Amazonka.LexRuntime.Types.DialogState.DialogState
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.Types.DialogState.DialogState
instance GHC.Generics.Generic Amazonka.LexRuntime.Types.DialogState.DialogState
instance GHC.Classes.Ord Amazonka.LexRuntime.Types.DialogState.DialogState
instance GHC.Classes.Eq Amazonka.LexRuntime.Types.DialogState.DialogState
instance GHC.Read.Read Amazonka.LexRuntime.Types.DialogState.DialogState
instance GHC.Show.Show Amazonka.LexRuntime.Types.DialogState.DialogState
module Amazonka.LexRuntime.Types.FulfillmentState
newtype FulfillmentState
FulfillmentState' :: Text -> FulfillmentState
[fromFulfillmentState] :: FulfillmentState -> Text
pattern FulfillmentState_Failed :: FulfillmentState
pattern FulfillmentState_Fulfilled :: FulfillmentState
pattern FulfillmentState_ReadyForFulfillment :: FulfillmentState
instance Amazonka.Data.XML.ToXML Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
instance Amazonka.Data.XML.FromXML Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
instance Data.Aeson.Types.ToJSON.ToJSONKey Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
instance Data.Aeson.Types.ToJSON.ToJSON Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
instance Data.Aeson.Types.FromJSON.FromJSONKey Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
instance Data.Aeson.Types.FromJSON.FromJSON Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
instance Amazonka.Data.Query.ToQuery Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
instance Amazonka.Data.Headers.ToHeader Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
instance Amazonka.Data.Log.ToLog Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
instance Amazonka.Data.ByteString.ToByteString Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
instance Amazonka.Data.Text.ToText Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
instance Amazonka.Data.Text.FromText Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
instance Control.DeepSeq.NFData Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
instance GHC.Generics.Generic Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
instance GHC.Classes.Ord Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
instance GHC.Classes.Eq Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
instance GHC.Read.Read Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
instance GHC.Show.Show Amazonka.LexRuntime.Types.FulfillmentState.FulfillmentState
module Amazonka.LexRuntime.Types.GenericAttachment
-- | Represents an option rendered to the user when a prompt is shown. It
-- could be an image, a button, a link, or text.
--
-- See: newGenericAttachment smart constructor.
data GenericAttachment
GenericAttachment' :: Maybe Text -> Maybe [Button] -> Maybe Text -> Maybe Text -> Maybe Text -> GenericAttachment
-- | The URL of an attachment to the response card.
[$sel:attachmentLinkUrl:GenericAttachment'] :: GenericAttachment -> Maybe Text
-- | The list of options to show to the user.
[$sel:buttons:GenericAttachment'] :: GenericAttachment -> Maybe [Button]
-- | The URL of an image that is displayed to the user.
[$sel:imageUrl:GenericAttachment'] :: GenericAttachment -> Maybe Text
-- | The subtitle shown below the title.
[$sel:subTitle:GenericAttachment'] :: GenericAttachment -> Maybe Text
-- | The title of the option.
[$sel:title:GenericAttachment'] :: GenericAttachment -> Maybe Text
-- | Create a value of GenericAttachment with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:attachmentLinkUrl:GenericAttachment',
-- genericAttachment_attachmentLinkUrl - The URL of an attachment
-- to the response card.
--
-- $sel:buttons:GenericAttachment',
-- genericAttachment_buttons - The list of options to show to the
-- user.
--
-- $sel:imageUrl:GenericAttachment',
-- genericAttachment_imageUrl - The URL of an image that is
-- displayed to the user.
--
-- $sel:subTitle:GenericAttachment',
-- genericAttachment_subTitle - The subtitle shown below the
-- title.
--
-- $sel:title:GenericAttachment', genericAttachment_title -
-- The title of the option.
newGenericAttachment :: GenericAttachment
-- | The URL of an attachment to the response card.
genericAttachment_attachmentLinkUrl :: Lens' GenericAttachment (Maybe Text)
-- | The list of options to show to the user.
genericAttachment_buttons :: Lens' GenericAttachment (Maybe [Button])
-- | The URL of an image that is displayed to the user.
genericAttachment_imageUrl :: Lens' GenericAttachment (Maybe Text)
-- | The subtitle shown below the title.
genericAttachment_subTitle :: Lens' GenericAttachment (Maybe Text)
-- | The title of the option.
genericAttachment_title :: Lens' GenericAttachment (Maybe Text)
instance GHC.Generics.Generic Amazonka.LexRuntime.Types.GenericAttachment.GenericAttachment
instance GHC.Show.Show Amazonka.LexRuntime.Types.GenericAttachment.GenericAttachment
instance GHC.Read.Read Amazonka.LexRuntime.Types.GenericAttachment.GenericAttachment
instance GHC.Classes.Eq Amazonka.LexRuntime.Types.GenericAttachment.GenericAttachment
instance Data.Aeson.Types.FromJSON.FromJSON Amazonka.LexRuntime.Types.GenericAttachment.GenericAttachment
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.Types.GenericAttachment.GenericAttachment
instance Control.DeepSeq.NFData Amazonka.LexRuntime.Types.GenericAttachment.GenericAttachment
module Amazonka.LexRuntime.Types.IntentConfidence
-- | Provides a score that indicates the confidence that Amazon Lex has
-- that an intent is the one that satisfies the user's intent.
--
-- See: newIntentConfidence smart constructor.
data IntentConfidence
IntentConfidence' :: Maybe Double -> IntentConfidence
-- | A score that indicates how confident Amazon Lex is that an intent
-- satisfies the user's intent. Ranges between 0.00 and 1.00. Higher
-- scores indicate higher confidence.
[$sel:score:IntentConfidence'] :: IntentConfidence -> Maybe Double
-- | Create a value of IntentConfidence with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:score:IntentConfidence', intentConfidence_score - A
-- score that indicates how confident Amazon Lex is that an intent
-- satisfies the user's intent. Ranges between 0.00 and 1.00. Higher
-- scores indicate higher confidence.
newIntentConfidence :: IntentConfidence
-- | A score that indicates how confident Amazon Lex is that an intent
-- satisfies the user's intent. Ranges between 0.00 and 1.00. Higher
-- scores indicate higher confidence.
intentConfidence_score :: Lens' IntentConfidence (Maybe Double)
instance GHC.Generics.Generic Amazonka.LexRuntime.Types.IntentConfidence.IntentConfidence
instance GHC.Show.Show Amazonka.LexRuntime.Types.IntentConfidence.IntentConfidence
instance GHC.Read.Read Amazonka.LexRuntime.Types.IntentConfidence.IntentConfidence
instance GHC.Classes.Eq Amazonka.LexRuntime.Types.IntentConfidence.IntentConfidence
instance Data.Aeson.Types.FromJSON.FromJSON Amazonka.LexRuntime.Types.IntentConfidence.IntentConfidence
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.Types.IntentConfidence.IntentConfidence
instance Control.DeepSeq.NFData Amazonka.LexRuntime.Types.IntentConfidence.IntentConfidence
module Amazonka.LexRuntime.Types.IntentSummary
-- | Provides information about the state of an intent. You can use this
-- information to get the current state of an intent so that you can
-- process the intent, or so that you can return the intent to its
-- previous state.
--
-- See: newIntentSummary smart constructor.
data IntentSummary
IntentSummary' :: Maybe Text -> Maybe ConfirmationStatus -> Maybe FulfillmentState -> Maybe Text -> Maybe Text -> Maybe (Sensitive (HashMap Text Text)) -> DialogActionType -> IntentSummary
-- | A user-defined label that identifies a particular intent. You can use
-- this label to return to a previous intent.
--
-- Use the checkpointLabelFilter parameter of the
-- GetSessionRequest operation to filter the intents returned by
-- the operation to those with only the specified label.
[$sel:checkpointLabel:IntentSummary'] :: IntentSummary -> Maybe Text
-- | The status of the intent after the user responds to the confirmation
-- prompt. If the user confirms the intent, Amazon Lex sets this field to
-- Confirmed. If the user denies the intent, Amazon Lex sets
-- this value to Denied. The possible values are:
--
--
-- - Confirmed - The user has responded "Yes" to the
-- confirmation prompt, confirming that the intent is complete and that
-- it is ready to be fulfilled.
-- - Denied - The user has responded "No" to the confirmation
-- prompt.
-- - None - The user has never been prompted for confirmation;
-- or, the user was prompted but did not confirm or deny the prompt.
--
[$sel:confirmationStatus:IntentSummary'] :: IntentSummary -> Maybe ConfirmationStatus
-- | 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.
--
[$sel:fulfillmentState:IntentSummary'] :: IntentSummary -> Maybe FulfillmentState
-- | The name of the intent.
[$sel:intentName:IntentSummary'] :: IntentSummary -> Maybe Text
-- | The next slot to elicit from the user. If there is not slot to elicit,
-- the field is blank.
[$sel:slotToElicit:IntentSummary'] :: IntentSummary -> Maybe Text
-- | Map of the slots that have been gathered and their values.
[$sel:slots:IntentSummary'] :: IntentSummary -> Maybe (Sensitive (HashMap Text 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.
-- - 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.
--
[$sel:dialogActionType:IntentSummary'] :: IntentSummary -> DialogActionType
-- | Create a value of IntentSummary with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:checkpointLabel:IntentSummary',
-- intentSummary_checkpointLabel - A user-defined label that
-- identifies a particular intent. You can use this label to return to a
-- previous intent.
--
-- Use the checkpointLabelFilter parameter of the
-- GetSessionRequest operation to filter the intents returned by
-- the operation to those with only the specified label.
--
-- $sel:confirmationStatus:IntentSummary',
-- intentSummary_confirmationStatus - The status of the intent
-- after the user responds to the confirmation prompt. If the user
-- confirms the intent, Amazon Lex sets this field to Confirmed.
-- If the user denies the intent, Amazon Lex sets this value to
-- Denied. The possible values are:
--
--
-- - Confirmed - The user has responded "Yes" to the
-- confirmation prompt, confirming that the intent is complete and that
-- it is ready to be fulfilled.
-- - Denied - The user has responded "No" to the confirmation
-- prompt.
-- - None - The user has never been prompted for confirmation;
-- or, the user was prompted but did not confirm or deny the prompt.
--
--
-- $sel:fulfillmentState:IntentSummary',
-- intentSummary_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.
--
--
-- $sel:intentName:IntentSummary', intentSummary_intentName
-- - The name of the intent.
--
-- $sel:slotToElicit:IntentSummary',
-- intentSummary_slotToElicit - The next slot to elicit from the
-- user. If there is not slot to elicit, the field is blank.
--
-- $sel:slots:IntentSummary', intentSummary_slots - Map of
-- the slots that have been gathered and their values.
--
-- $sel:dialogActionType:IntentSummary',
-- intentSummary_dialogActionType - 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.
-- - 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.
--
newIntentSummary :: DialogActionType -> IntentSummary
-- | A user-defined label that identifies a particular intent. You can use
-- this label to return to a previous intent.
--
-- Use the checkpointLabelFilter parameter of the
-- GetSessionRequest operation to filter the intents returned by
-- the operation to those with only the specified label.
intentSummary_checkpointLabel :: Lens' IntentSummary (Maybe Text)
-- | The status of the intent after the user responds to the confirmation
-- prompt. If the user confirms the intent, Amazon Lex sets this field to
-- Confirmed. If the user denies the intent, Amazon Lex sets
-- this value to Denied. The possible values are:
--
--
-- - Confirmed - The user has responded "Yes" to the
-- confirmation prompt, confirming that the intent is complete and that
-- it is ready to be fulfilled.
-- - Denied - The user has responded "No" to the confirmation
-- prompt.
-- - None - The user has never been prompted for confirmation;
-- or, the user was prompted but did not confirm or deny the prompt.
--
intentSummary_confirmationStatus :: Lens' IntentSummary (Maybe ConfirmationStatus)
-- | 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.
--
intentSummary_fulfillmentState :: Lens' IntentSummary (Maybe FulfillmentState)
-- | The name of the intent.
intentSummary_intentName :: Lens' IntentSummary (Maybe Text)
-- | The next slot to elicit from the user. If there is not slot to elicit,
-- the field is blank.
intentSummary_slotToElicit :: Lens' IntentSummary (Maybe Text)
-- | Map of the slots that have been gathered and their values.
intentSummary_slots :: Lens' IntentSummary (Maybe (HashMap Text 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.
-- - 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.
--
intentSummary_dialogActionType :: Lens' IntentSummary DialogActionType
instance GHC.Generics.Generic Amazonka.LexRuntime.Types.IntentSummary.IntentSummary
instance GHC.Show.Show Amazonka.LexRuntime.Types.IntentSummary.IntentSummary
instance GHC.Classes.Eq Amazonka.LexRuntime.Types.IntentSummary.IntentSummary
instance Data.Aeson.Types.FromJSON.FromJSON Amazonka.LexRuntime.Types.IntentSummary.IntentSummary
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.Types.IntentSummary.IntentSummary
instance Control.DeepSeq.NFData Amazonka.LexRuntime.Types.IntentSummary.IntentSummary
instance Data.Aeson.Types.ToJSON.ToJSON Amazonka.LexRuntime.Types.IntentSummary.IntentSummary
module Amazonka.LexRuntime.Types.MessageFormatType
newtype MessageFormatType
MessageFormatType' :: Text -> MessageFormatType
[fromMessageFormatType] :: MessageFormatType -> Text
pattern MessageFormatType_Composite :: MessageFormatType
pattern MessageFormatType_CustomPayload :: MessageFormatType
pattern MessageFormatType_PlainText :: MessageFormatType
pattern MessageFormatType_SSML :: MessageFormatType
instance Amazonka.Data.XML.ToXML Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
instance Amazonka.Data.XML.FromXML Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
instance Data.Aeson.Types.ToJSON.ToJSONKey Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
instance Data.Aeson.Types.ToJSON.ToJSON Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
instance Data.Aeson.Types.FromJSON.FromJSONKey Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
instance Data.Aeson.Types.FromJSON.FromJSON Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
instance Amazonka.Data.Query.ToQuery Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
instance Amazonka.Data.Headers.ToHeader Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
instance Amazonka.Data.Log.ToLog Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
instance Amazonka.Data.ByteString.ToByteString Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
instance Amazonka.Data.Text.ToText Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
instance Amazonka.Data.Text.FromText Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
instance Control.DeepSeq.NFData Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
instance GHC.Generics.Generic Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
instance GHC.Classes.Ord Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
instance GHC.Classes.Eq Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
instance GHC.Read.Read Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
instance GHC.Show.Show Amazonka.LexRuntime.Types.MessageFormatType.MessageFormatType
module Amazonka.LexRuntime.Types.DialogAction
-- | 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' :: Maybe FulfillmentState -> Maybe Text -> Maybe (Sensitive Text) -> Maybe MessageFormatType -> Maybe Text -> Maybe (Sensitive (HashMap Text Text)) -> DialogActionType -> 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.
--
[$sel:fulfillmentState:DialogAction'] :: DialogAction -> Maybe FulfillmentState
-- | The name of the intent.
[$sel:intentName:DialogAction'] :: DialogAction -> Maybe 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.
[$sel:message:DialogAction'] :: DialogAction -> Maybe (Sensitive 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 Message
-- Groups.
--
[$sel:messageFormat:DialogAction'] :: DialogAction -> Maybe MessageFormatType
-- | The name of the slot that should be elicited from the user.
[$sel:slotToElicit:DialogAction'] :: DialogAction -> Maybe Text
-- | Map of the slots that have been gathered and their values.
[$sel:slots:DialogAction'] :: DialogAction -> Maybe (Sensitive (HashMap Text 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.
--
[$sel:type':DialogAction'] :: DialogAction -> DialogActionType
-- | Create a value of DialogAction with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:fulfillmentState:DialogAction',
-- 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.
--
--
-- $sel:intentName:DialogAction', dialogAction_intentName -
-- The name of the intent.
--
-- $sel:message:DialogAction', 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.
--
-- $sel:messageFormat:DialogAction',
-- 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 Message
-- Groups.
--
--
-- $sel:slotToElicit:DialogAction',
-- dialogAction_slotToElicit - The name of the slot that should be
-- elicited from the user.
--
-- $sel:slots:DialogAction', dialogAction_slots - Map of
-- the slots that have been gathered and their values.
--
-- $sel:type':DialogAction', 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 :: DialogActionType -> 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_fulfillmentState :: Lens' DialogAction (Maybe FulfillmentState)
-- | The name of the intent.
dialogAction_intentName :: Lens' DialogAction (Maybe 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_message :: Lens' DialogAction (Maybe 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 Message
-- Groups.
--
dialogAction_messageFormat :: Lens' DialogAction (Maybe MessageFormatType)
-- | The name of the slot that should be elicited from the user.
dialogAction_slotToElicit :: Lens' DialogAction (Maybe Text)
-- | Map of the slots that have been gathered and their values.
dialogAction_slots :: Lens' DialogAction (Maybe (HashMap Text 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_type :: Lens' DialogAction DialogActionType
instance GHC.Generics.Generic Amazonka.LexRuntime.Types.DialogAction.DialogAction
instance GHC.Show.Show Amazonka.LexRuntime.Types.DialogAction.DialogAction
instance GHC.Classes.Eq Amazonka.LexRuntime.Types.DialogAction.DialogAction
instance Data.Aeson.Types.FromJSON.FromJSON Amazonka.LexRuntime.Types.DialogAction.DialogAction
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.Types.DialogAction.DialogAction
instance Control.DeepSeq.NFData Amazonka.LexRuntime.Types.DialogAction.DialogAction
instance Data.Aeson.Types.ToJSON.ToJSON Amazonka.LexRuntime.Types.DialogAction.DialogAction
module Amazonka.LexRuntime.Types.PredictedIntent
-- | An intent that Amazon Lex suggests satisfies the user's intent.
-- Includes the name of the intent, the confidence that Amazon Lex has
-- that the user's intent is satisfied, and the slots defined for the
-- intent.
--
-- See: newPredictedIntent smart constructor.
data PredictedIntent
PredictedIntent' :: Maybe Text -> Maybe IntentConfidence -> Maybe (Sensitive (HashMap Text Text)) -> PredictedIntent
-- | The name of the intent that Amazon Lex suggests satisfies the user's
-- intent.
[$sel:intentName:PredictedIntent'] :: PredictedIntent -> Maybe Text
-- | Indicates how confident Amazon Lex is that an intent satisfies the
-- user's intent.
[$sel:nluIntentConfidence:PredictedIntent'] :: PredictedIntent -> Maybe IntentConfidence
-- | The slot and slot values associated with the predicted intent.
[$sel:slots:PredictedIntent'] :: PredictedIntent -> Maybe (Sensitive (HashMap Text Text))
-- | Create a value of PredictedIntent with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:intentName:PredictedIntent',
-- predictedIntent_intentName - The name of the intent that Amazon
-- Lex suggests satisfies the user's intent.
--
-- $sel:nluIntentConfidence:PredictedIntent',
-- predictedIntent_nluIntentConfidence - Indicates how confident
-- Amazon Lex is that an intent satisfies the user's intent.
--
-- $sel:slots:PredictedIntent', predictedIntent_slots - The
-- slot and slot values associated with the predicted intent.
newPredictedIntent :: PredictedIntent
-- | The name of the intent that Amazon Lex suggests satisfies the user's
-- intent.
predictedIntent_intentName :: Lens' PredictedIntent (Maybe Text)
-- | Indicates how confident Amazon Lex is that an intent satisfies the
-- user's intent.
predictedIntent_nluIntentConfidence :: Lens' PredictedIntent (Maybe IntentConfidence)
-- | The slot and slot values associated with the predicted intent.
predictedIntent_slots :: Lens' PredictedIntent (Maybe (HashMap Text Text))
instance GHC.Generics.Generic Amazonka.LexRuntime.Types.PredictedIntent.PredictedIntent
instance GHC.Show.Show Amazonka.LexRuntime.Types.PredictedIntent.PredictedIntent
instance GHC.Classes.Eq Amazonka.LexRuntime.Types.PredictedIntent.PredictedIntent
instance Data.Aeson.Types.FromJSON.FromJSON Amazonka.LexRuntime.Types.PredictedIntent.PredictedIntent
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.Types.PredictedIntent.PredictedIntent
instance Control.DeepSeq.NFData Amazonka.LexRuntime.Types.PredictedIntent.PredictedIntent
module Amazonka.LexRuntime.Types.ResponseCard
-- | If you configure a response card when creating your bots, Amazon Lex
-- substitutes the session attributes and slot values that are available,
-- and then returns it. The response card can also come from a Lambda
-- function ( dialogCodeHook and fulfillmentActivity on
-- an intent).
--
-- See: newResponseCard smart constructor.
data ResponseCard
ResponseCard' :: Maybe ContentType -> Maybe [GenericAttachment] -> Maybe Text -> ResponseCard
-- | The content type of the response.
[$sel:contentType:ResponseCard'] :: ResponseCard -> Maybe ContentType
-- | An array of attachment objects representing options.
[$sel:genericAttachments:ResponseCard'] :: ResponseCard -> Maybe [GenericAttachment]
-- | The version of the response card format.
[$sel:version:ResponseCard'] :: ResponseCard -> Maybe Text
-- | Create a value of ResponseCard with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:contentType:ResponseCard', responseCard_contentType
-- - The content type of the response.
--
-- $sel:genericAttachments:ResponseCard',
-- responseCard_genericAttachments - An array of attachment
-- objects representing options.
--
-- $sel:version:ResponseCard', responseCard_version - The
-- version of the response card format.
newResponseCard :: ResponseCard
-- | The content type of the response.
responseCard_contentType :: Lens' ResponseCard (Maybe ContentType)
-- | An array of attachment objects representing options.
responseCard_genericAttachments :: Lens' ResponseCard (Maybe [GenericAttachment])
-- | The version of the response card format.
responseCard_version :: Lens' ResponseCard (Maybe Text)
instance GHC.Generics.Generic Amazonka.LexRuntime.Types.ResponseCard.ResponseCard
instance GHC.Show.Show Amazonka.LexRuntime.Types.ResponseCard.ResponseCard
instance GHC.Read.Read Amazonka.LexRuntime.Types.ResponseCard.ResponseCard
instance GHC.Classes.Eq Amazonka.LexRuntime.Types.ResponseCard.ResponseCard
instance Data.Aeson.Types.FromJSON.FromJSON Amazonka.LexRuntime.Types.ResponseCard.ResponseCard
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.Types.ResponseCard.ResponseCard
instance Control.DeepSeq.NFData Amazonka.LexRuntime.Types.ResponseCard.ResponseCard
module Amazonka.LexRuntime.Types.SentimentResponse
-- | The sentiment expressed in an utterance.
--
-- When the bot is configured to send utterances to Amazon Comprehend for
-- sentiment analysis, this field structure contains the result of the
-- analysis.
--
-- See: newSentimentResponse smart constructor.
data SentimentResponse
SentimentResponse' :: Maybe Text -> Maybe Text -> SentimentResponse
-- | The inferred sentiment that Amazon Comprehend has the highest
-- confidence in.
[$sel:sentimentLabel:SentimentResponse'] :: SentimentResponse -> Maybe Text
-- | The likelihood that the sentiment was correctly inferred.
[$sel:sentimentScore:SentimentResponse'] :: SentimentResponse -> Maybe Text
-- | Create a value of SentimentResponse with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:sentimentLabel:SentimentResponse',
-- sentimentResponse_sentimentLabel - The inferred sentiment that
-- Amazon Comprehend has the highest confidence in.
--
-- $sel:sentimentScore:SentimentResponse',
-- sentimentResponse_sentimentScore - The likelihood that the
-- sentiment was correctly inferred.
newSentimentResponse :: SentimentResponse
-- | The inferred sentiment that Amazon Comprehend has the highest
-- confidence in.
sentimentResponse_sentimentLabel :: Lens' SentimentResponse (Maybe Text)
-- | The likelihood that the sentiment was correctly inferred.
sentimentResponse_sentimentScore :: Lens' SentimentResponse (Maybe Text)
instance GHC.Generics.Generic Amazonka.LexRuntime.Types.SentimentResponse.SentimentResponse
instance GHC.Show.Show Amazonka.LexRuntime.Types.SentimentResponse.SentimentResponse
instance GHC.Read.Read Amazonka.LexRuntime.Types.SentimentResponse.SentimentResponse
instance GHC.Classes.Eq Amazonka.LexRuntime.Types.SentimentResponse.SentimentResponse
instance Data.Aeson.Types.FromJSON.FromJSON Amazonka.LexRuntime.Types.SentimentResponse.SentimentResponse
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.Types.SentimentResponse.SentimentResponse
instance Control.DeepSeq.NFData Amazonka.LexRuntime.Types.SentimentResponse.SentimentResponse
module Amazonka.LexRuntime.Types
-- | API version 2016-11-28 of the Amazon Lex Runtime Service SDK
-- configuration.
defaultService :: Service
-- | Either the Amazon Lex bot is still building, or one of the dependent
-- services (Amazon Polly, AWS Lambda) failed with an internal service
-- error.
_BadGatewayException :: AsError a => Fold a ServiceError
-- | Request validation failed, there is no usable message in the context,
-- or the bot build failed, is still in progress, or contains unbuilt
-- changes.
_BadRequestException :: AsError a => Fold a ServiceError
-- | Two clients are using the same AWS account, Amazon Lex bot, and user
-- ID.
_ConflictException :: AsError a => Fold a ServiceError
-- | One of the dependencies, such as AWS Lambda or Amazon Polly, threw an
-- exception. For example,
--
--
-- - If Amazon Lex does not have sufficient permissions to call a
-- Lambda function.
-- - If a Lambda function takes longer than 30 seconds to execute.
-- - If a fulfillment Lambda function returns a Delegate
-- dialog action without removing any slot values.
--
_DependencyFailedException :: AsError a => Fold a ServiceError
-- | Internal service error. Retry the call.
_InternalFailureException :: AsError a => Fold a ServiceError
-- | Exceeded a limit.
_LimitExceededException :: AsError a => Fold a ServiceError
-- | This exception is not used.
_LoopDetectedException :: AsError a => Fold a ServiceError
-- | The accept header in the request does not have a valid value.
_NotAcceptableException :: AsError a => Fold a ServiceError
-- | The resource (such as the Amazon Lex bot or an alias) that is referred
-- to is not found.
_NotFoundException :: AsError a => Fold a ServiceError
-- | The input speech is too long.
_RequestTimeoutException :: AsError a => Fold a ServiceError
-- | The Content-Type header (PostContent API) has an invalid
-- value.
_UnsupportedMediaTypeException :: AsError a => Fold a ServiceError
newtype ConfirmationStatus
ConfirmationStatus' :: Text -> ConfirmationStatus
[fromConfirmationStatus] :: ConfirmationStatus -> Text
pattern ConfirmationStatus_Confirmed :: ConfirmationStatus
pattern ConfirmationStatus_Denied :: ConfirmationStatus
pattern ConfirmationStatus_None :: ConfirmationStatus
newtype ContentType
ContentType' :: Text -> ContentType
[fromContentType] :: ContentType -> Text
pattern ContentType_Application_vnd_amazonaws_card_generic :: ContentType
newtype DialogActionType
DialogActionType' :: Text -> DialogActionType
[fromDialogActionType] :: DialogActionType -> Text
pattern DialogActionType_Close :: DialogActionType
pattern DialogActionType_ConfirmIntent :: DialogActionType
pattern DialogActionType_Delegate :: DialogActionType
pattern DialogActionType_ElicitIntent :: DialogActionType
pattern DialogActionType_ElicitSlot :: DialogActionType
newtype DialogState
DialogState' :: Text -> DialogState
[fromDialogState] :: DialogState -> Text
pattern DialogState_ConfirmIntent :: DialogState
pattern DialogState_ElicitIntent :: DialogState
pattern DialogState_ElicitSlot :: DialogState
pattern DialogState_Failed :: DialogState
pattern DialogState_Fulfilled :: DialogState
pattern DialogState_ReadyForFulfillment :: DialogState
newtype FulfillmentState
FulfillmentState' :: Text -> FulfillmentState
[fromFulfillmentState] :: FulfillmentState -> Text
pattern FulfillmentState_Failed :: FulfillmentState
pattern FulfillmentState_Fulfilled :: FulfillmentState
pattern FulfillmentState_ReadyForFulfillment :: FulfillmentState
newtype MessageFormatType
MessageFormatType' :: Text -> MessageFormatType
[fromMessageFormatType] :: MessageFormatType -> Text
pattern MessageFormatType_Composite :: MessageFormatType
pattern MessageFormatType_CustomPayload :: MessageFormatType
pattern MessageFormatType_PlainText :: MessageFormatType
pattern MessageFormatType_SSML :: MessageFormatType
-- | A context is a variable that contains information about the current
-- state of the conversation between a user and Amazon Lex. Context can
-- be set automatically by Amazon Lex when an intent is fulfilled, or it
-- can be set at runtime using the PutContent, PutText,
-- or PutSession operation.
--
-- See: newActiveContext smart constructor.
data ActiveContext
ActiveContext' :: Text -> ActiveContextTimeToLive -> HashMap Text (Sensitive Text) -> ActiveContext
-- | The name of the context.
[$sel:name:ActiveContext'] :: ActiveContext -> Text
-- | The length of time or number of turns that a context remains active.
[$sel:timeToLive:ActiveContext'] :: ActiveContext -> ActiveContextTimeToLive
-- | State variables for the current context. You can use these values as
-- default values for slots in subsequent events.
[$sel:parameters:ActiveContext'] :: ActiveContext -> HashMap Text (Sensitive Text)
-- | Create a value of ActiveContext with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:name:ActiveContext', activeContext_name - The name
-- of the context.
--
-- $sel:timeToLive:ActiveContext', activeContext_timeToLive
-- - The length of time or number of turns that a context remains active.
--
-- $sel:parameters:ActiveContext', activeContext_parameters
-- - State variables for the current context. You can use these values as
-- default values for slots in subsequent events.
newActiveContext :: Text -> ActiveContextTimeToLive -> ActiveContext
-- | The name of the context.
activeContext_name :: Lens' ActiveContext Text
-- | The length of time or number of turns that a context remains active.
activeContext_timeToLive :: Lens' ActiveContext ActiveContextTimeToLive
-- | State variables for the current context. You can use these values as
-- default values for slots in subsequent events.
activeContext_parameters :: Lens' ActiveContext (HashMap Text Text)
-- | The length of time or number of turns that a context remains active.
--
-- See: newActiveContextTimeToLive smart constructor.
data ActiveContextTimeToLive
ActiveContextTimeToLive' :: Maybe Natural -> Maybe Natural -> ActiveContextTimeToLive
-- | The number of seconds that the context should be active after it is
-- first sent in a PostContent or PostText response.
-- You can set the value between 5 and 86,400 seconds (24 hours).
[$sel:timeToLiveInSeconds:ActiveContextTimeToLive'] :: ActiveContextTimeToLive -> Maybe Natural
-- | The number of conversation turns that the context should be active. A
-- conversation turn is one PostContent or PostText
-- request and the corresponding response from Amazon Lex.
[$sel:turnsToLive:ActiveContextTimeToLive'] :: ActiveContextTimeToLive -> Maybe Natural
-- | Create a value of ActiveContextTimeToLive with all optional
-- fields omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:timeToLiveInSeconds:ActiveContextTimeToLive',
-- activeContextTimeToLive_timeToLiveInSeconds - The number of
-- seconds that the context should be active after it is first sent in a
-- PostContent or PostText response. You can set the
-- value between 5 and 86,400 seconds (24 hours).
--
-- $sel:turnsToLive:ActiveContextTimeToLive',
-- activeContextTimeToLive_turnsToLive - The number of
-- conversation turns that the context should be active. A conversation
-- turn is one PostContent or PostText request and the
-- corresponding response from Amazon Lex.
newActiveContextTimeToLive :: ActiveContextTimeToLive
-- | The number of seconds that the context should be active after it is
-- first sent in a PostContent or PostText response.
-- You can set the value between 5 and 86,400 seconds (24 hours).
activeContextTimeToLive_timeToLiveInSeconds :: Lens' ActiveContextTimeToLive (Maybe Natural)
-- | The number of conversation turns that the context should be active. A
-- conversation turn is one PostContent or PostText
-- request and the corresponding response from Amazon Lex.
activeContextTimeToLive_turnsToLive :: Lens' ActiveContextTimeToLive (Maybe Natural)
-- | Represents an option to be shown on the client platform (Facebook,
-- Slack, etc.)
--
-- See: newButton smart constructor.
data Button
Button' :: Text -> Text -> Button
-- | Text that is visible to the user on the button.
[$sel:text:Button'] :: Button -> Text
-- | The value sent to Amazon Lex when a user chooses the button. For
-- example, consider button text "NYC." When the user chooses the button,
-- the value sent can be "New York City."
[$sel:value:Button'] :: Button -> Text
-- | Create a value of Button with all optional fields omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:text:Button', button_text - Text that is visible to
-- the user on the button.
--
-- $sel:value:Button', button_value - The value sent to
-- Amazon Lex when a user chooses the button. For example, consider
-- button text "NYC." When the user chooses the button, the value sent
-- can be "New York City."
newButton :: Text -> Text -> Button
-- | Text that is visible to the user on the button.
button_text :: Lens' Button Text
-- | The value sent to Amazon Lex when a user chooses the button. For
-- example, consider button text "NYC." When the user chooses the button,
-- the value sent can be "New York City."
button_value :: Lens' Button Text
-- | 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' :: Maybe FulfillmentState -> Maybe Text -> Maybe (Sensitive Text) -> Maybe MessageFormatType -> Maybe Text -> Maybe (Sensitive (HashMap Text Text)) -> DialogActionType -> 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.
--
[$sel:fulfillmentState:DialogAction'] :: DialogAction -> Maybe FulfillmentState
-- | The name of the intent.
[$sel:intentName:DialogAction'] :: DialogAction -> Maybe 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.
[$sel:message:DialogAction'] :: DialogAction -> Maybe (Sensitive 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 Message
-- Groups.
--
[$sel:messageFormat:DialogAction'] :: DialogAction -> Maybe MessageFormatType
-- | The name of the slot that should be elicited from the user.
[$sel:slotToElicit:DialogAction'] :: DialogAction -> Maybe Text
-- | Map of the slots that have been gathered and their values.
[$sel:slots:DialogAction'] :: DialogAction -> Maybe (Sensitive (HashMap Text 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.
--
[$sel:type':DialogAction'] :: DialogAction -> DialogActionType
-- | Create a value of DialogAction with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:fulfillmentState:DialogAction',
-- 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.
--
--
-- $sel:intentName:DialogAction', dialogAction_intentName -
-- The name of the intent.
--
-- $sel:message:DialogAction', 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.
--
-- $sel:messageFormat:DialogAction',
-- 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 Message
-- Groups.
--
--
-- $sel:slotToElicit:DialogAction',
-- dialogAction_slotToElicit - The name of the slot that should be
-- elicited from the user.
--
-- $sel:slots:DialogAction', dialogAction_slots - Map of
-- the slots that have been gathered and their values.
--
-- $sel:type':DialogAction', 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 :: DialogActionType -> 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_fulfillmentState :: Lens' DialogAction (Maybe FulfillmentState)
-- | The name of the intent.
dialogAction_intentName :: Lens' DialogAction (Maybe 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_message :: Lens' DialogAction (Maybe 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 Message
-- Groups.
--
dialogAction_messageFormat :: Lens' DialogAction (Maybe MessageFormatType)
-- | The name of the slot that should be elicited from the user.
dialogAction_slotToElicit :: Lens' DialogAction (Maybe Text)
-- | Map of the slots that have been gathered and their values.
dialogAction_slots :: Lens' DialogAction (Maybe (HashMap Text 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_type :: Lens' DialogAction DialogActionType
-- | Represents an option rendered to the user when a prompt is shown. It
-- could be an image, a button, a link, or text.
--
-- See: newGenericAttachment smart constructor.
data GenericAttachment
GenericAttachment' :: Maybe Text -> Maybe [Button] -> Maybe Text -> Maybe Text -> Maybe Text -> GenericAttachment
-- | The URL of an attachment to the response card.
[$sel:attachmentLinkUrl:GenericAttachment'] :: GenericAttachment -> Maybe Text
-- | The list of options to show to the user.
[$sel:buttons:GenericAttachment'] :: GenericAttachment -> Maybe [Button]
-- | The URL of an image that is displayed to the user.
[$sel:imageUrl:GenericAttachment'] :: GenericAttachment -> Maybe Text
-- | The subtitle shown below the title.
[$sel:subTitle:GenericAttachment'] :: GenericAttachment -> Maybe Text
-- | The title of the option.
[$sel:title:GenericAttachment'] :: GenericAttachment -> Maybe Text
-- | Create a value of GenericAttachment with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:attachmentLinkUrl:GenericAttachment',
-- genericAttachment_attachmentLinkUrl - The URL of an attachment
-- to the response card.
--
-- $sel:buttons:GenericAttachment',
-- genericAttachment_buttons - The list of options to show to the
-- user.
--
-- $sel:imageUrl:GenericAttachment',
-- genericAttachment_imageUrl - The URL of an image that is
-- displayed to the user.
--
-- $sel:subTitle:GenericAttachment',
-- genericAttachment_subTitle - The subtitle shown below the
-- title.
--
-- $sel:title:GenericAttachment', genericAttachment_title -
-- The title of the option.
newGenericAttachment :: GenericAttachment
-- | The URL of an attachment to the response card.
genericAttachment_attachmentLinkUrl :: Lens' GenericAttachment (Maybe Text)
-- | The list of options to show to the user.
genericAttachment_buttons :: Lens' GenericAttachment (Maybe [Button])
-- | The URL of an image that is displayed to the user.
genericAttachment_imageUrl :: Lens' GenericAttachment (Maybe Text)
-- | The subtitle shown below the title.
genericAttachment_subTitle :: Lens' GenericAttachment (Maybe Text)
-- | The title of the option.
genericAttachment_title :: Lens' GenericAttachment (Maybe Text)
-- | Provides a score that indicates the confidence that Amazon Lex has
-- that an intent is the one that satisfies the user's intent.
--
-- See: newIntentConfidence smart constructor.
data IntentConfidence
IntentConfidence' :: Maybe Double -> IntentConfidence
-- | A score that indicates how confident Amazon Lex is that an intent
-- satisfies the user's intent. Ranges between 0.00 and 1.00. Higher
-- scores indicate higher confidence.
[$sel:score:IntentConfidence'] :: IntentConfidence -> Maybe Double
-- | Create a value of IntentConfidence with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:score:IntentConfidence', intentConfidence_score - A
-- score that indicates how confident Amazon Lex is that an intent
-- satisfies the user's intent. Ranges between 0.00 and 1.00. Higher
-- scores indicate higher confidence.
newIntentConfidence :: IntentConfidence
-- | A score that indicates how confident Amazon Lex is that an intent
-- satisfies the user's intent. Ranges between 0.00 and 1.00. Higher
-- scores indicate higher confidence.
intentConfidence_score :: Lens' IntentConfidence (Maybe Double)
-- | Provides information about the state of an intent. You can use this
-- information to get the current state of an intent so that you can
-- process the intent, or so that you can return the intent to its
-- previous state.
--
-- See: newIntentSummary smart constructor.
data IntentSummary
IntentSummary' :: Maybe Text -> Maybe ConfirmationStatus -> Maybe FulfillmentState -> Maybe Text -> Maybe Text -> Maybe (Sensitive (HashMap Text Text)) -> DialogActionType -> IntentSummary
-- | A user-defined label that identifies a particular intent. You can use
-- this label to return to a previous intent.
--
-- Use the checkpointLabelFilter parameter of the
-- GetSessionRequest operation to filter the intents returned by
-- the operation to those with only the specified label.
[$sel:checkpointLabel:IntentSummary'] :: IntentSummary -> Maybe Text
-- | The status of the intent after the user responds to the confirmation
-- prompt. If the user confirms the intent, Amazon Lex sets this field to
-- Confirmed. If the user denies the intent, Amazon Lex sets
-- this value to Denied. The possible values are:
--
--
-- - Confirmed - The user has responded "Yes" to the
-- confirmation prompt, confirming that the intent is complete and that
-- it is ready to be fulfilled.
-- - Denied - The user has responded "No" to the confirmation
-- prompt.
-- - None - The user has never been prompted for confirmation;
-- or, the user was prompted but did not confirm or deny the prompt.
--
[$sel:confirmationStatus:IntentSummary'] :: IntentSummary -> Maybe ConfirmationStatus
-- | 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.
--
[$sel:fulfillmentState:IntentSummary'] :: IntentSummary -> Maybe FulfillmentState
-- | The name of the intent.
[$sel:intentName:IntentSummary'] :: IntentSummary -> Maybe Text
-- | The next slot to elicit from the user. If there is not slot to elicit,
-- the field is blank.
[$sel:slotToElicit:IntentSummary'] :: IntentSummary -> Maybe Text
-- | Map of the slots that have been gathered and their values.
[$sel:slots:IntentSummary'] :: IntentSummary -> Maybe (Sensitive (HashMap Text 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.
-- - 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.
--
[$sel:dialogActionType:IntentSummary'] :: IntentSummary -> DialogActionType
-- | Create a value of IntentSummary with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:checkpointLabel:IntentSummary',
-- intentSummary_checkpointLabel - A user-defined label that
-- identifies a particular intent. You can use this label to return to a
-- previous intent.
--
-- Use the checkpointLabelFilter parameter of the
-- GetSessionRequest operation to filter the intents returned by
-- the operation to those with only the specified label.
--
-- $sel:confirmationStatus:IntentSummary',
-- intentSummary_confirmationStatus - The status of the intent
-- after the user responds to the confirmation prompt. If the user
-- confirms the intent, Amazon Lex sets this field to Confirmed.
-- If the user denies the intent, Amazon Lex sets this value to
-- Denied. The possible values are:
--
--
-- - Confirmed - The user has responded "Yes" to the
-- confirmation prompt, confirming that the intent is complete and that
-- it is ready to be fulfilled.
-- - Denied - The user has responded "No" to the confirmation
-- prompt.
-- - None - The user has never been prompted for confirmation;
-- or, the user was prompted but did not confirm or deny the prompt.
--
--
-- $sel:fulfillmentState:IntentSummary',
-- intentSummary_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.
--
--
-- $sel:intentName:IntentSummary', intentSummary_intentName
-- - The name of the intent.
--
-- $sel:slotToElicit:IntentSummary',
-- intentSummary_slotToElicit - The next slot to elicit from the
-- user. If there is not slot to elicit, the field is blank.
--
-- $sel:slots:IntentSummary', intentSummary_slots - Map of
-- the slots that have been gathered and their values.
--
-- $sel:dialogActionType:IntentSummary',
-- intentSummary_dialogActionType - 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.
-- - 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.
--
newIntentSummary :: DialogActionType -> IntentSummary
-- | A user-defined label that identifies a particular intent. You can use
-- this label to return to a previous intent.
--
-- Use the checkpointLabelFilter parameter of the
-- GetSessionRequest operation to filter the intents returned by
-- the operation to those with only the specified label.
intentSummary_checkpointLabel :: Lens' IntentSummary (Maybe Text)
-- | The status of the intent after the user responds to the confirmation
-- prompt. If the user confirms the intent, Amazon Lex sets this field to
-- Confirmed. If the user denies the intent, Amazon Lex sets
-- this value to Denied. The possible values are:
--
--
-- - Confirmed - The user has responded "Yes" to the
-- confirmation prompt, confirming that the intent is complete and that
-- it is ready to be fulfilled.
-- - Denied - The user has responded "No" to the confirmation
-- prompt.
-- - None - The user has never been prompted for confirmation;
-- or, the user was prompted but did not confirm or deny the prompt.
--
intentSummary_confirmationStatus :: Lens' IntentSummary (Maybe ConfirmationStatus)
-- | 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.
--
intentSummary_fulfillmentState :: Lens' IntentSummary (Maybe FulfillmentState)
-- | The name of the intent.
intentSummary_intentName :: Lens' IntentSummary (Maybe Text)
-- | The next slot to elicit from the user. If there is not slot to elicit,
-- the field is blank.
intentSummary_slotToElicit :: Lens' IntentSummary (Maybe Text)
-- | Map of the slots that have been gathered and their values.
intentSummary_slots :: Lens' IntentSummary (Maybe (HashMap Text 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.
-- - 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.
--
intentSummary_dialogActionType :: Lens' IntentSummary DialogActionType
-- | An intent that Amazon Lex suggests satisfies the user's intent.
-- Includes the name of the intent, the confidence that Amazon Lex has
-- that the user's intent is satisfied, and the slots defined for the
-- intent.
--
-- See: newPredictedIntent smart constructor.
data PredictedIntent
PredictedIntent' :: Maybe Text -> Maybe IntentConfidence -> Maybe (Sensitive (HashMap Text Text)) -> PredictedIntent
-- | The name of the intent that Amazon Lex suggests satisfies the user's
-- intent.
[$sel:intentName:PredictedIntent'] :: PredictedIntent -> Maybe Text
-- | Indicates how confident Amazon Lex is that an intent satisfies the
-- user's intent.
[$sel:nluIntentConfidence:PredictedIntent'] :: PredictedIntent -> Maybe IntentConfidence
-- | The slot and slot values associated with the predicted intent.
[$sel:slots:PredictedIntent'] :: PredictedIntent -> Maybe (Sensitive (HashMap Text Text))
-- | Create a value of PredictedIntent with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:intentName:PredictedIntent',
-- predictedIntent_intentName - The name of the intent that Amazon
-- Lex suggests satisfies the user's intent.
--
-- $sel:nluIntentConfidence:PredictedIntent',
-- predictedIntent_nluIntentConfidence - Indicates how confident
-- Amazon Lex is that an intent satisfies the user's intent.
--
-- $sel:slots:PredictedIntent', predictedIntent_slots - The
-- slot and slot values associated with the predicted intent.
newPredictedIntent :: PredictedIntent
-- | The name of the intent that Amazon Lex suggests satisfies the user's
-- intent.
predictedIntent_intentName :: Lens' PredictedIntent (Maybe Text)
-- | Indicates how confident Amazon Lex is that an intent satisfies the
-- user's intent.
predictedIntent_nluIntentConfidence :: Lens' PredictedIntent (Maybe IntentConfidence)
-- | The slot and slot values associated with the predicted intent.
predictedIntent_slots :: Lens' PredictedIntent (Maybe (HashMap Text Text))
-- | If you configure a response card when creating your bots, Amazon Lex
-- substitutes the session attributes and slot values that are available,
-- and then returns it. The response card can also come from a Lambda
-- function ( dialogCodeHook and fulfillmentActivity on
-- an intent).
--
-- See: newResponseCard smart constructor.
data ResponseCard
ResponseCard' :: Maybe ContentType -> Maybe [GenericAttachment] -> Maybe Text -> ResponseCard
-- | The content type of the response.
[$sel:contentType:ResponseCard'] :: ResponseCard -> Maybe ContentType
-- | An array of attachment objects representing options.
[$sel:genericAttachments:ResponseCard'] :: ResponseCard -> Maybe [GenericAttachment]
-- | The version of the response card format.
[$sel:version:ResponseCard'] :: ResponseCard -> Maybe Text
-- | Create a value of ResponseCard with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:contentType:ResponseCard', responseCard_contentType
-- - The content type of the response.
--
-- $sel:genericAttachments:ResponseCard',
-- responseCard_genericAttachments - An array of attachment
-- objects representing options.
--
-- $sel:version:ResponseCard', responseCard_version - The
-- version of the response card format.
newResponseCard :: ResponseCard
-- | The content type of the response.
responseCard_contentType :: Lens' ResponseCard (Maybe ContentType)
-- | An array of attachment objects representing options.
responseCard_genericAttachments :: Lens' ResponseCard (Maybe [GenericAttachment])
-- | The version of the response card format.
responseCard_version :: Lens' ResponseCard (Maybe Text)
-- | The sentiment expressed in an utterance.
--
-- When the bot is configured to send utterances to Amazon Comprehend for
-- sentiment analysis, this field structure contains the result of the
-- analysis.
--
-- See: newSentimentResponse smart constructor.
data SentimentResponse
SentimentResponse' :: Maybe Text -> Maybe Text -> SentimentResponse
-- | The inferred sentiment that Amazon Comprehend has the highest
-- confidence in.
[$sel:sentimentLabel:SentimentResponse'] :: SentimentResponse -> Maybe Text
-- | The likelihood that the sentiment was correctly inferred.
[$sel:sentimentScore:SentimentResponse'] :: SentimentResponse -> Maybe Text
-- | Create a value of SentimentResponse with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:sentimentLabel:SentimentResponse',
-- sentimentResponse_sentimentLabel - The inferred sentiment that
-- Amazon Comprehend has the highest confidence in.
--
-- $sel:sentimentScore:SentimentResponse',
-- sentimentResponse_sentimentScore - The likelihood that the
-- sentiment was correctly inferred.
newSentimentResponse :: SentimentResponse
-- | The inferred sentiment that Amazon Comprehend has the highest
-- confidence in.
sentimentResponse_sentimentLabel :: Lens' SentimentResponse (Maybe Text)
-- | The likelihood that the sentiment was correctly inferred.
sentimentResponse_sentimentScore :: Lens' SentimentResponse (Maybe Text)
-- | Creates a new session or modifies an existing session with an Amazon
-- Lex bot. Use this operation to enable your application to set the
-- state of the bot.
--
-- For more information, see Managing Sessions.
module Amazonka.LexRuntime.PutSession
-- | See: newPutSession smart constructor.
data PutSession
PutSession' :: Maybe Text -> Maybe (Sensitive [ActiveContext]) -> Maybe DialogAction -> Maybe [IntentSummary] -> Maybe (Sensitive (HashMap Text Text)) -> Text -> Text -> Text -> PutSession
-- | The message that Amazon Lex returns in the response can be either text
-- or speech based depending on the value of this field.
--
--
-- - If the value is text/plain; charset=utf-8, Amazon Lex
-- returns text in the response.
-- - If the value begins with audio/, Amazon Lex returns
-- speech in the response. Amazon Lex uses Amazon Polly to generate the
-- speech in the configuration that you specify. For example, if you
-- specify audio/mpeg as the value, Amazon Lex returns speech in
-- the MPEG format.
-- - If the value is audio/pcm, the speech is returned as
-- audio/pcm in 16-bit, little endian format.
-- - The following are the accepted
-- values:
--
[$sel:accept:PutSession'] :: PutSession -> Maybe Text
-- | A list of contexts active for the request. A context can be activated
-- when a previous intent is fulfilled, or by including the context in
-- the request,
--
-- If you don't specify a list of contexts, Amazon Lex will use the
-- current list of contexts for the session. If you specify an empty
-- list, all contexts for the session are cleared.
[$sel:activeContexts:PutSession'] :: PutSession -> Maybe (Sensitive [ActiveContext])
-- | Sets the next action that the bot should take to fulfill the
-- conversation.
[$sel:dialogAction:PutSession'] :: PutSession -> Maybe DialogAction
-- | A summary of the recent intents for the bot. You can use the intent
-- summary view to set a checkpoint label on an intent and modify
-- attributes of intents. You can also use it to remove or add intent
-- summary objects to the list.
--
-- An intent that you modify or add to the list must make sense for the
-- bot. For example, the intent name must be valid for the bot. You must
-- provide valid values for:
--
--
-- intentName
-- - slot names
-- slotToElict
--
--
-- If you send the recentIntentSummaryView parameter in a
-- PutSession request, the contents of the new summary view
-- replaces the old summary view. For example, if a GetSession
-- request returns three intents in the summary view and you call
-- PutSession with one intent in the summary view, the next call
-- to GetSession will only return one intent.
[$sel:recentIntentSummaryView:PutSession'] :: PutSession -> Maybe [IntentSummary]
-- | Map of key/value pairs representing the session-specific context
-- information. It contains application information passed between Amazon
-- Lex and a client application.
[$sel:sessionAttributes:PutSession'] :: PutSession -> Maybe (Sensitive (HashMap Text Text))
-- | The name of the bot that contains the session data.
[$sel:botName:PutSession'] :: PutSession -> Text
-- | The alias in use for the bot that contains the session data.
[$sel:botAlias:PutSession'] :: PutSession -> Text
-- | The ID of the client application user. Amazon Lex uses this to
-- identify a user's conversation with your bot.
[$sel:userId:PutSession'] :: PutSession -> Text
-- | Create a value of PutSession with all optional fields omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:accept:PutSession', putSession_accept - The message
-- that Amazon Lex returns in the response can be either text or speech
-- based depending on the value of this field.
--
--
-- - If the value is text/plain; charset=utf-8, Amazon Lex
-- returns text in the response.
-- - If the value begins with audio/, Amazon Lex returns
-- speech in the response. Amazon Lex uses Amazon Polly to generate the
-- speech in the configuration that you specify. For example, if you
-- specify audio/mpeg as the value, Amazon Lex returns speech in
-- the MPEG format.
-- - If the value is audio/pcm, the speech is returned as
-- audio/pcm in 16-bit, little endian format.
-- - The following are the accepted
-- values:
--
--
-- PutSession, putSession_activeContexts - A list of
-- contexts active for the request. A context can be activated when a
-- previous intent is fulfilled, or by including the context in the
-- request,
--
-- If you don't specify a list of contexts, Amazon Lex will use the
-- current list of contexts for the session. If you specify an empty
-- list, all contexts for the session are cleared.
--
-- $sel:dialogAction:PutSession', putSession_dialogAction -
-- Sets the next action that the bot should take to fulfill the
-- conversation.
--
-- $sel:recentIntentSummaryView:PutSession',
-- putSession_recentIntentSummaryView - A summary of the recent
-- intents for the bot. You can use the intent summary view to set a
-- checkpoint label on an intent and modify attributes of intents. You
-- can also use it to remove or add intent summary objects to the list.
--
-- An intent that you modify or add to the list must make sense for the
-- bot. For example, the intent name must be valid for the bot. You must
-- provide valid values for:
--
--
-- intentName
-- - slot names
-- slotToElict
--
--
-- If you send the recentIntentSummaryView parameter in a
-- PutSession request, the contents of the new summary view
-- replaces the old summary view. For example, if a GetSession
-- request returns three intents in the summary view and you call
-- PutSession with one intent in the summary view, the next call
-- to GetSession will only return one intent.
--
-- PutSession, putSession_sessionAttributes - Map of
-- key/value pairs representing the session-specific context information.
-- It contains application information passed between Amazon Lex and a
-- client application.
--
-- $sel:botName:PutSession', putSession_botName - The name
-- of the bot that contains the session data.
--
-- $sel:botAlias:PutSession', putSession_botAlias - The
-- alias in use for the bot that contains the session data.
--
-- $sel:userId:PutSession', putSession_userId - The ID of
-- the client application user. Amazon Lex uses this to identify a user's
-- conversation with your bot.
newPutSession :: Text -> Text -> Text -> PutSession
-- | The message that Amazon Lex returns in the response can be either text
-- or speech based depending on the value of this field.
--
--
-- - If the value is text/plain; charset=utf-8, Amazon Lex
-- returns text in the response.
-- - If the value begins with audio/, Amazon Lex returns
-- speech in the response. Amazon Lex uses Amazon Polly to generate the
-- speech in the configuration that you specify. For example, if you
-- specify audio/mpeg as the value, Amazon Lex returns speech in
-- the MPEG format.
-- - If the value is audio/pcm, the speech is returned as
-- audio/pcm in 16-bit, little endian format.
-- - The following are the accepted
-- values:
--
putSession_accept :: Lens' PutSession (Maybe Text)
-- | A list of contexts active for the request. A context can be activated
-- when a previous intent is fulfilled, or by including the context in
-- the request,
--
-- If you don't specify a list of contexts, Amazon Lex will use the
-- current list of contexts for the session. If you specify an empty
-- list, all contexts for the session are cleared.
putSession_activeContexts :: Lens' PutSession (Maybe [ActiveContext])
-- | Sets the next action that the bot should take to fulfill the
-- conversation.
putSession_dialogAction :: Lens' PutSession (Maybe DialogAction)
-- | A summary of the recent intents for the bot. You can use the intent
-- summary view to set a checkpoint label on an intent and modify
-- attributes of intents. You can also use it to remove or add intent
-- summary objects to the list.
--
-- An intent that you modify or add to the list must make sense for the
-- bot. For example, the intent name must be valid for the bot. You must
-- provide valid values for:
--
--
-- intentName
-- - slot names
-- slotToElict
--
--
-- If you send the recentIntentSummaryView parameter in a
-- PutSession request, the contents of the new summary view
-- replaces the old summary view. For example, if a GetSession
-- request returns three intents in the summary view and you call
-- PutSession with one intent in the summary view, the next call
-- to GetSession will only return one intent.
putSession_recentIntentSummaryView :: Lens' PutSession (Maybe [IntentSummary])
-- | Map of key/value pairs representing the session-specific context
-- information. It contains application information passed between Amazon
-- Lex and a client application.
putSession_sessionAttributes :: Lens' PutSession (Maybe (HashMap Text Text))
-- | The name of the bot that contains the session data.
putSession_botName :: Lens' PutSession Text
-- | The alias in use for the bot that contains the session data.
putSession_botAlias :: Lens' PutSession Text
-- | The ID of the client application user. Amazon Lex uses this to
-- identify a user's conversation with your bot.
putSession_userId :: Lens' PutSession Text
-- | See: newPutSessionResponse smart constructor.
data PutSessionResponse
PutSessionResponse' :: Maybe (Sensitive Text) -> Maybe Text -> Maybe DialogState -> Maybe (Sensitive Text) -> Maybe Text -> Maybe (Sensitive Text) -> Maybe MessageFormatType -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Int -> ResponseBody -> PutSessionResponse
-- | A list of active contexts for the session.
[$sel:activeContexts:PutSessionResponse'] :: PutSessionResponse -> Maybe (Sensitive Text)
-- | Content type as specified in the Accept HTTP header in the
-- request.
[$sel:contentType:PutSessionResponse'] :: PutSessionResponse -> Maybe Text
-- |
-- - ConfirmIntent - Amazon Lex is expecting a "yes" or "no"
-- response to confirm the intent before fulfilling an intent.
-- - ElicitIntent - Amazon Lex wants to elicit the user's
-- intent.
-- - ElicitSlot - Amazon Lex is expecting the value of a slot
-- for the current intent.
-- - Failed - Conveys that the conversation with the user has
-- failed. This can happen for various reasons, including the user does
-- not provide an appropriate response to prompts from the service, or if
-- the Lambda function fails to fulfill the intent.
-- - Fulfilled - Conveys that the Lambda function has
-- sucessfully fulfilled the intent.
-- - ReadyForFulfillment - Conveys that the client has to
-- fulfill the intent.
--
[$sel:dialogState:PutSessionResponse'] :: PutSessionResponse -> Maybe DialogState
-- | The next message that should be presented to the user.
--
-- The encodedMessage field is base-64 encoded. You must decode
-- the field before you can use the value.
[$sel:encodedMessage:PutSessionResponse'] :: PutSessionResponse -> Maybe (Sensitive Text)
-- | The name of the current intent.
[$sel:intentName:PutSessionResponse'] :: PutSessionResponse -> Maybe Text
-- | The next message that should be presented to the user.
--
-- You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419,
-- es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales,
-- the message field is null. You should use the
-- encodedMessage field instead.
[$sel:message:PutSessionResponse'] :: PutSessionResponse -> Maybe (Sensitive Text)
-- | The format of the response message. One of the following values:
--
--
-- - 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 from the groups that messages were
-- assigned to when the intent was created.
--
[$sel:messageFormat:PutSessionResponse'] :: PutSessionResponse -> Maybe MessageFormatType
-- | Map of key/value pairs representing session-specific context
-- information.
[$sel:sessionAttributes:PutSessionResponse'] :: PutSessionResponse -> Maybe Text
-- | A unique identifier for the session.
[$sel:sessionId:PutSessionResponse'] :: PutSessionResponse -> Maybe Text
-- | If the dialogState is ElicitSlot, returns the name
-- of the slot for which Amazon Lex is eliciting a value.
[$sel:slotToElicit:PutSessionResponse'] :: PutSessionResponse -> Maybe Text
-- | Map of zero or more intent slots Amazon Lex detected from the user
-- input during the conversation.
--
-- Amazon Lex creates a resolution list containing likely values for a
-- slot. The value that it returns is determined by the
-- valueSelectionStrategy selected when the slot type was
-- created or updated. If valueSelectionStrategy is set to
-- ORIGINAL_VALUE, the value provided by the user is returned,
-- if the user value is similar to the slot values. If
-- valueSelectionStrategy is set to TOP_RESOLUTION
-- Amazon Lex returns the first value in the resolution list or, if there
-- is no resolution list, null. If you don't specify a
-- valueSelectionStrategy the default is
-- ORIGINAL_VALUE.
[$sel:slots:PutSessionResponse'] :: PutSessionResponse -> Maybe Text
-- | The response's http status code.
[$sel:httpStatus:PutSessionResponse'] :: PutSessionResponse -> Int
-- | The audio version of the message to convey to the user.
[$sel:audioStream:PutSessionResponse'] :: PutSessionResponse -> ResponseBody
-- | Create a value of PutSessionResponse with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- PutSession, putSessionResponse_activeContexts - A list
-- of active contexts for the session.
--
-- PutSessionResponse, putSessionResponse_contentType -
-- Content type as specified in the Accept HTTP header in the
-- request.
--
-- $sel:dialogState:PutSessionResponse',
-- putSessionResponse_dialogState - - ConfirmIntent -
-- Amazon Lex is expecting a "yes" or "no" response to confirm the intent
-- before fulfilling an intent.
--
--
-- - ElicitIntent - Amazon Lex wants to elicit the user's
-- intent.
-- - ElicitSlot - Amazon Lex is expecting the value of a slot
-- for the current intent.
-- - Failed - Conveys that the conversation with the user has
-- failed. This can happen for various reasons, including the user does
-- not provide an appropriate response to prompts from the service, or if
-- the Lambda function fails to fulfill the intent.
-- - Fulfilled - Conveys that the Lambda function has
-- sucessfully fulfilled the intent.
-- - ReadyForFulfillment - Conveys that the client has to
-- fulfill the intent.
--
--
-- $sel:encodedMessage:PutSessionResponse',
-- putSessionResponse_encodedMessage - The next message that
-- should be presented to the user.
--
-- The encodedMessage field is base-64 encoded. You must decode
-- the field before you can use the value.
--
-- PutSessionResponse, putSessionResponse_intentName - The
-- name of the current intent.
--
-- PutSessionResponse, putSessionResponse_message - The
-- next message that should be presented to the user.
--
-- You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419,
-- es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales,
-- the message field is null. You should use the
-- encodedMessage field instead.
--
-- PutSessionResponse, putSessionResponse_messageFormat -
-- The format of the response message. One of the following values:
--
--
-- - 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 from the groups that messages were
-- assigned to when the intent was created.
--
--
-- PutSession, putSessionResponse_sessionAttributes - Map
-- of key/value pairs representing session-specific context information.
--
-- $sel:sessionId:PutSessionResponse',
-- putSessionResponse_sessionId - A unique identifier for the
-- session.
--
-- PutSessionResponse, putSessionResponse_slotToElicit - If
-- the dialogState is ElicitSlot, returns the name of
-- the slot for which Amazon Lex is eliciting a value.
--
-- PutSessionResponse, putSessionResponse_slots - Map of
-- zero or more intent slots Amazon Lex detected from the user input
-- during the conversation.
--
-- Amazon Lex creates a resolution list containing likely values for a
-- slot. The value that it returns is determined by the
-- valueSelectionStrategy selected when the slot type was
-- created or updated. If valueSelectionStrategy is set to
-- ORIGINAL_VALUE, the value provided by the user is returned,
-- if the user value is similar to the slot values. If
-- valueSelectionStrategy is set to TOP_RESOLUTION
-- Amazon Lex returns the first value in the resolution list or, if there
-- is no resolution list, null. If you don't specify a
-- valueSelectionStrategy the default is
-- ORIGINAL_VALUE.
--
-- $sel:httpStatus:PutSessionResponse',
-- putSessionResponse_httpStatus - The response's http status
-- code.
--
-- $sel:audioStream:PutSessionResponse',
-- putSessionResponse_audioStream - The audio version of the
-- message to convey to the user.
newPutSessionResponse :: Int -> ResponseBody -> PutSessionResponse
-- | A list of active contexts for the session.
putSessionResponse_activeContexts :: Lens' PutSessionResponse (Maybe Text)
-- | Content type as specified in the Accept HTTP header in the
-- request.
putSessionResponse_contentType :: Lens' PutSessionResponse (Maybe Text)
-- |
-- - ConfirmIntent - Amazon Lex is expecting a "yes" or "no"
-- response to confirm the intent before fulfilling an intent.
-- - ElicitIntent - Amazon Lex wants to elicit the user's
-- intent.
-- - ElicitSlot - Amazon Lex is expecting the value of a slot
-- for the current intent.
-- - Failed - Conveys that the conversation with the user has
-- failed. This can happen for various reasons, including the user does
-- not provide an appropriate response to prompts from the service, or if
-- the Lambda function fails to fulfill the intent.
-- - Fulfilled - Conveys that the Lambda function has
-- sucessfully fulfilled the intent.
-- - ReadyForFulfillment - Conveys that the client has to
-- fulfill the intent.
--
putSessionResponse_dialogState :: Lens' PutSessionResponse (Maybe DialogState)
-- | The next message that should be presented to the user.
--
-- The encodedMessage field is base-64 encoded. You must decode
-- the field before you can use the value.
putSessionResponse_encodedMessage :: Lens' PutSessionResponse (Maybe Text)
-- | The name of the current intent.
putSessionResponse_intentName :: Lens' PutSessionResponse (Maybe Text)
-- | The next message that should be presented to the user.
--
-- You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419,
-- es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales,
-- the message field is null. You should use the
-- encodedMessage field instead.
putSessionResponse_message :: Lens' PutSessionResponse (Maybe Text)
-- | The format of the response message. One of the following values:
--
--
-- - 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 from the groups that messages were
-- assigned to when the intent was created.
--
putSessionResponse_messageFormat :: Lens' PutSessionResponse (Maybe MessageFormatType)
-- | Map of key/value pairs representing session-specific context
-- information.
putSessionResponse_sessionAttributes :: Lens' PutSessionResponse (Maybe Text)
-- | A unique identifier for the session.
putSessionResponse_sessionId :: Lens' PutSessionResponse (Maybe Text)
-- | If the dialogState is ElicitSlot, returns the name
-- of the slot for which Amazon Lex is eliciting a value.
putSessionResponse_slotToElicit :: Lens' PutSessionResponse (Maybe Text)
-- | Map of zero or more intent slots Amazon Lex detected from the user
-- input during the conversation.
--
-- Amazon Lex creates a resolution list containing likely values for a
-- slot. The value that it returns is determined by the
-- valueSelectionStrategy selected when the slot type was
-- created or updated. If valueSelectionStrategy is set to
-- ORIGINAL_VALUE, the value provided by the user is returned,
-- if the user value is similar to the slot values. If
-- valueSelectionStrategy is set to TOP_RESOLUTION
-- Amazon Lex returns the first value in the resolution list or, if there
-- is no resolution list, null. If you don't specify a
-- valueSelectionStrategy the default is
-- ORIGINAL_VALUE.
putSessionResponse_slots :: Lens' PutSessionResponse (Maybe Text)
-- | The response's http status code.
putSessionResponse_httpStatus :: Lens' PutSessionResponse Int
-- | The audio version of the message to convey to the user.
putSessionResponse_audioStream :: Lens' PutSessionResponse ResponseBody
instance GHC.Generics.Generic Amazonka.LexRuntime.PutSession.PutSession
instance GHC.Show.Show Amazonka.LexRuntime.PutSession.PutSession
instance GHC.Classes.Eq Amazonka.LexRuntime.PutSession.PutSession
instance GHC.Generics.Generic Amazonka.LexRuntime.PutSession.PutSessionResponse
instance GHC.Show.Show Amazonka.LexRuntime.PutSession.PutSessionResponse
instance Amazonka.Types.AWSRequest Amazonka.LexRuntime.PutSession.PutSession
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.PutSession.PutSession
instance Control.DeepSeq.NFData Amazonka.LexRuntime.PutSession.PutSession
instance Amazonka.Data.Headers.ToHeaders Amazonka.LexRuntime.PutSession.PutSession
instance Data.Aeson.Types.ToJSON.ToJSON Amazonka.LexRuntime.PutSession.PutSession
instance Amazonka.Data.Path.ToPath Amazonka.LexRuntime.PutSession.PutSession
instance Amazonka.Data.Query.ToQuery Amazonka.LexRuntime.PutSession.PutSession
-- | Sends user input to Amazon Lex. Client applications can use this API
-- to send requests to Amazon Lex at runtime. Amazon Lex then interprets
-- the user input using the machine learning model it built for the bot.
--
-- In response, Amazon Lex returns the next message to convey to
-- the user an optional responseCard to display. Consider the
-- following example messages:
--
--
-- - For a user input "I would like a pizza", Amazon Lex might return a
-- response with a message eliciting slot data (for example, PizzaSize):
-- "What size pizza would you like?"
-- - After the user provides all of the pizza order information, Amazon
-- Lex might return a response with a message to obtain user confirmation
-- "Proceed with the pizza order?".
-- - After the user replies to a confirmation prompt with a "yes",
-- Amazon Lex might return a conclusion statement: "Thank you, your
-- cheese pizza has been ordered.".
--
--
-- Not all Amazon Lex messages require a user response. For example, a
-- conclusion statement does not require a response. Some messages
-- require only a "yes" or "no" user response. In addition to the
-- message, Amazon Lex provides additional context about the
-- message in the response that you might use to enhance client behavior,
-- for example, to display the appropriate client user interface. These
-- are the slotToElicit, dialogState,
-- intentName, and slots fields in the response.
-- Consider the following examples:
--
--
-- - If the message is to elicit slot data, Amazon Lex returns the
-- following context information:
- dialogState set to
-- ElicitSlot
- intentName set to the intent name in the
-- current context
- slotToElicit set to the slot name for
-- which the message is eliciting
-- information
- slots set to a map of slots, configured
-- for the intent, with currently known values
-- - If the message is a confirmation prompt, the dialogState
-- is set to ConfirmIntent and SlotToElicit is set to null.
-- - If the message is a clarification prompt (configured for the
-- intent) that indicates that user intent is not understood, the
-- dialogState is set to ElicitIntent and slotToElicit
-- is set to null.
--
--
-- In addition, Amazon Lex also returns your application-specific
-- sessionAttributes. For more information, see Managing
-- Conversation Context.
module Amazonka.LexRuntime.PostText
-- | See: newPostText smart constructor.
data PostText
PostText' :: Maybe (Sensitive [ActiveContext]) -> Maybe (Sensitive (HashMap Text Text)) -> Maybe (Sensitive (HashMap Text Text)) -> Text -> Text -> Text -> Sensitive Text -> PostText
-- | A list of contexts active for the request. A context can be activated
-- when a previous intent is fulfilled, or by including the context in
-- the request,
--
-- If you don't specify a list of contexts, Amazon Lex will use the
-- current list of contexts for the session. If you specify an empty
-- list, all contexts for the session are cleared.
[$sel:activeContexts:PostText'] :: PostText -> Maybe (Sensitive [ActiveContext])
-- | Request-specific information passed between Amazon Lex and a client
-- application.
--
-- The namespace x-amz-lex: is reserved for special attributes.
-- Don't create any request attributes with the prefix
-- x-amz-lex:.
--
-- For more information, see Setting Request Attributes.
[$sel:requestAttributes:PostText'] :: PostText -> Maybe (Sensitive (HashMap Text Text))
-- | Application-specific information passed between Amazon Lex and a
-- client application.
--
-- For more information, see Setting Session Attributes.
[$sel:sessionAttributes:PostText'] :: PostText -> Maybe (Sensitive (HashMap Text Text))
-- | The name of the Amazon Lex bot.
[$sel:botName:PostText'] :: PostText -> Text
-- | The alias of the Amazon Lex bot.
[$sel:botAlias:PostText'] :: PostText -> Text
-- | The ID of the client application user. Amazon Lex uses this to
-- identify a user's conversation with your bot. At runtime, each request
-- must contain the userID field.
--
-- To decide the user ID to use for your application, consider the
-- following factors.
--
--
-- - The userID field must not contain any personally
-- identifiable information of the user, for example, name, personal
-- identification numbers, or other end user personal information.
-- - If you want a user to start a conversation on one device and
-- continue on another device, use a user-specific identifier.
-- - If you want the same user to be able to have two independent
-- conversations on two different devices, choose a device-specific
-- identifier.
-- - A user can't have two independent conversations with two different
-- versions of the same bot. For example, a user can't have a
-- conversation with the PROD and BETA versions of the same bot. If you
-- anticipate that a user will need to have conversation with two
-- different versions, for example, while testing, include the bot alias
-- in the user ID to separate the two conversations.
--
[$sel:userId:PostText'] :: PostText -> Text
-- | The text that the user entered (Amazon Lex interprets this text).
[$sel:inputText:PostText'] :: PostText -> Sensitive Text
-- | Create a value of PostText with all optional fields omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- PostText, postText_activeContexts - A list of contexts
-- active for the request. A context can be activated when a previous
-- intent is fulfilled, or by including the context in the request,
--
-- If you don't specify a list of contexts, Amazon Lex will use the
-- current list of contexts for the session. If you specify an empty
-- list, all contexts for the session are cleared.
--
-- $sel:requestAttributes:PostText',
-- postText_requestAttributes - Request-specific information
-- passed between Amazon Lex and a client application.
--
-- The namespace x-amz-lex: is reserved for special attributes.
-- Don't create any request attributes with the prefix
-- x-amz-lex:.
--
-- For more information, see Setting Request Attributes.
--
-- PostText, postText_sessionAttributes -
-- Application-specific information passed between Amazon Lex and a
-- client application.
--
-- For more information, see Setting Session Attributes.
--
-- $sel:botName:PostText', postText_botName - The name of
-- the Amazon Lex bot.
--
-- $sel:botAlias:PostText', postText_botAlias - The alias
-- of the Amazon Lex bot.
--
-- $sel:userId:PostText', postText_userId - The ID of the
-- client application user. Amazon Lex uses this to identify a user's
-- conversation with your bot. At runtime, each request must contain the
-- userID field.
--
-- To decide the user ID to use for your application, consider the
-- following factors.
--
--
-- - The userID field must not contain any personally
-- identifiable information of the user, for example, name, personal
-- identification numbers, or other end user personal information.
-- - If you want a user to start a conversation on one device and
-- continue on another device, use a user-specific identifier.
-- - If you want the same user to be able to have two independent
-- conversations on two different devices, choose a device-specific
-- identifier.
-- - A user can't have two independent conversations with two different
-- versions of the same bot. For example, a user can't have a
-- conversation with the PROD and BETA versions of the same bot. If you
-- anticipate that a user will need to have conversation with two
-- different versions, for example, while testing, include the bot alias
-- in the user ID to separate the two conversations.
--
--
-- $sel:inputText:PostText', postText_inputText - The text
-- that the user entered (Amazon Lex interprets this text).
newPostText :: Text -> Text -> Text -> Text -> PostText
-- | A list of contexts active for the request. A context can be activated
-- when a previous intent is fulfilled, or by including the context in
-- the request,
--
-- If you don't specify a list of contexts, Amazon Lex will use the
-- current list of contexts for the session. If you specify an empty
-- list, all contexts for the session are cleared.
postText_activeContexts :: Lens' PostText (Maybe [ActiveContext])
-- | Request-specific information passed between Amazon Lex and a client
-- application.
--
-- The namespace x-amz-lex: is reserved for special attributes.
-- Don't create any request attributes with the prefix
-- x-amz-lex:.
--
-- For more information, see Setting Request Attributes.
postText_requestAttributes :: Lens' PostText (Maybe (HashMap Text Text))
-- | Application-specific information passed between Amazon Lex and a
-- client application.
--
-- For more information, see Setting Session Attributes.
postText_sessionAttributes :: Lens' PostText (Maybe (HashMap Text Text))
-- | The name of the Amazon Lex bot.
postText_botName :: Lens' PostText Text
-- | The alias of the Amazon Lex bot.
postText_botAlias :: Lens' PostText Text
-- | The ID of the client application user. Amazon Lex uses this to
-- identify a user's conversation with your bot. At runtime, each request
-- must contain the userID field.
--
-- To decide the user ID to use for your application, consider the
-- following factors.
--
--
-- - The userID field must not contain any personally
-- identifiable information of the user, for example, name, personal
-- identification numbers, or other end user personal information.
-- - If you want a user to start a conversation on one device and
-- continue on another device, use a user-specific identifier.
-- - If you want the same user to be able to have two independent
-- conversations on two different devices, choose a device-specific
-- identifier.
-- - A user can't have two independent conversations with two different
-- versions of the same bot. For example, a user can't have a
-- conversation with the PROD and BETA versions of the same bot. If you
-- anticipate that a user will need to have conversation with two
-- different versions, for example, while testing, include the bot alias
-- in the user ID to separate the two conversations.
--
postText_userId :: Lens' PostText Text
-- | The text that the user entered (Amazon Lex interprets this text).
postText_inputText :: Lens' PostText Text
-- | See: newPostTextResponse smart constructor.
data PostTextResponse
PostTextResponse' :: Maybe (Sensitive [ActiveContext]) -> Maybe [PredictedIntent] -> Maybe Text -> Maybe DialogState -> Maybe Text -> Maybe (Sensitive Text) -> Maybe MessageFormatType -> Maybe IntentConfidence -> Maybe ResponseCard -> Maybe SentimentResponse -> Maybe (Sensitive (HashMap Text Text)) -> Maybe Text -> Maybe Text -> Maybe (Sensitive (HashMap Text Text)) -> Int -> PostTextResponse
-- | A list of active contexts for the session. A context can be set when
-- an intent is fulfilled or by calling the PostContent,
-- PostText, or PutSession operation.
--
-- You can use a context to control the intents that can follow up an
-- intent, or to modify the operation of your application.
[$sel:activeContexts:PostTextResponse'] :: PostTextResponse -> Maybe (Sensitive [ActiveContext])
-- | One to four alternative intents that may be applicable to the user's
-- intent.
--
-- Each alternative includes a score that indicates how confident Amazon
-- Lex is that the intent matches the user's intent. The intents are
-- sorted by the confidence score.
[$sel:alternativeIntents:PostTextResponse'] :: PostTextResponse -> Maybe [PredictedIntent]
-- | The version of the bot that responded to the conversation. You can use
-- this information to help determine if one version of a bot is
-- performing better than another version.
[$sel:botVersion:PostTextResponse'] :: PostTextResponse -> Maybe Text
-- | Identifies the current state of the user interaction. Amazon Lex
-- returns one of the following values as dialogState. The
-- client can optionally use this information to customize the user
-- interface.
--
--
-- - ElicitIntent - Amazon Lex wants to elicit user intent.For
-- example, a user might utter an intent ("I want to order a pizza"). If
-- Amazon Lex cannot infer the user intent from this utterance, it will
-- return this dialogState.
-- - ConfirmIntent - Amazon Lex is expecting a "yes" or "no"
-- response.For example, Amazon Lex wants user confirmation before
-- fulfilling an intent.Instead of a simple "yes" or "no," a user might
-- respond with additional information. For example, "yes, but make it
-- thick crust pizza" or "no, I want to order a drink". Amazon Lex can
-- process such additional information (in these examples, update the
-- crust type slot value, or change intent from OrderPizza to
-- OrderDrink).
-- - ElicitSlot - Amazon Lex is expecting a slot value for the
-- current intent.For example, suppose that in the response Amazon Lex
-- sends this message: "What size pizza would you like?". A user might
-- reply with the slot value (e.g., "medium"). The user might also
-- provide additional information in the response (e.g., "medium thick
-- crust pizza"). Amazon Lex can process such additional information
-- appropriately.
-- - Fulfilled - Conveys that the Lambda function configured
-- for the intent has successfully fulfilled the intent.
-- - ReadyForFulfillment - Conveys that the client has to
-- fulfill the intent.
-- - Failed - Conveys that the conversation with the user
-- failed.This can happen for various reasons including that the user did
-- not provide an appropriate response to prompts from the service (you
-- can configure how many times Amazon Lex can prompt a user for specific
-- information), or the Lambda function failed to fulfill the
-- intent.
--
[$sel:dialogState:PostTextResponse'] :: PostTextResponse -> Maybe DialogState
-- | The current user intent that Amazon Lex is aware of.
[$sel:intentName:PostTextResponse'] :: PostTextResponse -> Maybe Text
-- | The message to convey to the user. The message can come from the bot's
-- configuration or from a Lambda function.
--
-- If the intent is not configured with a Lambda function, or if the
-- Lambda function returned Delegate as the
-- dialogAction.type its response, Amazon Lex decides on the
-- next course of action and selects an appropriate message from the
-- bot's configuration based on the current interaction context. For
-- example, if Amazon Lex isn't able to understand user input, it uses a
-- clarification prompt message.
--
-- When you create an intent you can assign messages to groups. When
-- messages are assigned to groups Amazon Lex returns one message from
-- each group in the response. The message field is an escaped JSON
-- string containing the messages. For more information about the
-- structure of the JSON string returned, see msg-prompts-formats.
--
-- If the Lambda function returns a message, Amazon Lex passes it to the
-- client in its response.
[$sel:message:PostTextResponse'] :: PostTextResponse -> Maybe (Sensitive Text)
-- | The format of the response message. One of the following values:
--
--
-- - PlainText - The message contains plain UTF-8 text.
-- - CustomPayload - The message is a custom format defined by
-- the Lambda function.
-- - SSML - The message contains text formatted for voice
-- output.
-- - Composite - The message contains an escaped JSON object
-- containing one or more messages from the groups that messages were
-- assigned to when the intent was created.
--
[$sel:messageFormat:PostTextResponse'] :: PostTextResponse -> Maybe MessageFormatType
-- | Provides a score that indicates how confident Amazon Lex is that the
-- returned intent is the one that matches the user's intent. The score
-- is between 0.0 and 1.0. For more information, see Confidence
-- Scores.
--
-- The score is a relative score, not an absolute score. The score may
-- change based on improvements to Amazon Lex.
[$sel:nluIntentConfidence:PostTextResponse'] :: PostTextResponse -> Maybe IntentConfidence
-- | Represents the options that the user has to respond to the current
-- prompt. Response Card can come from the bot configuration (in the
-- Amazon Lex console, choose the settings button next to a slot) or from
-- a code hook (Lambda function).
[$sel:responseCard:PostTextResponse'] :: PostTextResponse -> Maybe ResponseCard
-- | The sentiment expressed in and utterance.
--
-- When the bot is configured to send utterances to Amazon Comprehend for
-- sentiment analysis, this field contains the result of the analysis.
[$sel:sentimentResponse:PostTextResponse'] :: PostTextResponse -> Maybe SentimentResponse
-- | A map of key-value pairs representing the session-specific context
-- information.
[$sel:sessionAttributes:PostTextResponse'] :: PostTextResponse -> Maybe (Sensitive (HashMap Text Text))
-- | A unique identifier for the session.
[$sel:sessionId:PostTextResponse'] :: PostTextResponse -> Maybe Text
-- | If the dialogState value is ElicitSlot, returns the
-- name of the slot for which Amazon Lex is eliciting a value.
[$sel:slotToElicit:PostTextResponse'] :: PostTextResponse -> Maybe Text
-- | The intent slots that Amazon Lex detected from the user input in the
-- conversation.
--
-- Amazon Lex creates a resolution list containing likely values for a
-- slot. The value that it returns is determined by the
-- valueSelectionStrategy selected when the slot type was
-- created or updated. If valueSelectionStrategy is set to
-- ORIGINAL_VALUE, the value provided by the user is returned,
-- if the user value is similar to the slot values. If
-- valueSelectionStrategy is set to TOP_RESOLUTION
-- Amazon Lex returns the first value in the resolution list or, if there
-- is no resolution list, null. If you don't specify a
-- valueSelectionStrategy, the default is
-- ORIGINAL_VALUE.
[$sel:slots:PostTextResponse'] :: PostTextResponse -> Maybe (Sensitive (HashMap Text Text))
-- | The response's http status code.
[$sel:httpStatus:PostTextResponse'] :: PostTextResponse -> Int
-- | Create a value of PostTextResponse with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- PostText, postTextResponse_activeContexts - A list of
-- active contexts for the session. A context can be set when an intent
-- is fulfilled or by calling the PostContent,
-- PostText, or PutSession operation.
--
-- You can use a context to control the intents that can follow up an
-- intent, or to modify the operation of your application.
--
-- $sel:alternativeIntents:PostTextResponse',
-- postTextResponse_alternativeIntents - One to four alternative
-- intents that may be applicable to the user's intent.
--
-- Each alternative includes a score that indicates how confident Amazon
-- Lex is that the intent matches the user's intent. The intents are
-- sorted by the confidence score.
--
-- $sel:botVersion:PostTextResponse',
-- postTextResponse_botVersion - The version of the bot that
-- responded to the conversation. You can use this information to help
-- determine if one version of a bot is performing better than another
-- version.
--
-- $sel:dialogState:PostTextResponse',
-- postTextResponse_dialogState - Identifies the current state of
-- the user interaction. Amazon Lex returns one of the following values
-- as dialogState. The client can optionally use this
-- information to customize the user interface.
--
--
-- - ElicitIntent - Amazon Lex wants to elicit user intent.For
-- example, a user might utter an intent ("I want to order a pizza"). If
-- Amazon Lex cannot infer the user intent from this utterance, it will
-- return this dialogState.
-- - ConfirmIntent - Amazon Lex is expecting a "yes" or "no"
-- response.For example, Amazon Lex wants user confirmation before
-- fulfilling an intent.Instead of a simple "yes" or "no," a user might
-- respond with additional information. For example, "yes, but make it
-- thick crust pizza" or "no, I want to order a drink". Amazon Lex can
-- process such additional information (in these examples, update the
-- crust type slot value, or change intent from OrderPizza to
-- OrderDrink).
-- - ElicitSlot - Amazon Lex is expecting a slot value for the
-- current intent.For example, suppose that in the response Amazon Lex
-- sends this message: "What size pizza would you like?". A user might
-- reply with the slot value (e.g., "medium"). The user might also
-- provide additional information in the response (e.g., "medium thick
-- crust pizza"). Amazon Lex can process such additional information
-- appropriately.
-- - Fulfilled - Conveys that the Lambda function configured
-- for the intent has successfully fulfilled the intent.
-- - ReadyForFulfillment - Conveys that the client has to
-- fulfill the intent.
-- - Failed - Conveys that the conversation with the user
-- failed.This can happen for various reasons including that the user did
-- not provide an appropriate response to prompts from the service (you
-- can configure how many times Amazon Lex can prompt a user for specific
-- information), or the Lambda function failed to fulfill the
-- intent.
--
--
-- PostTextResponse, postTextResponse_intentName - The
-- current user intent that Amazon Lex is aware of.
--
-- PostTextResponse, postTextResponse_message - The message
-- to convey to the user. The message can come from the bot's
-- configuration or from a Lambda function.
--
-- If the intent is not configured with a Lambda function, or if the
-- Lambda function returned Delegate as the
-- dialogAction.type its response, Amazon Lex decides on the
-- next course of action and selects an appropriate message from the
-- bot's configuration based on the current interaction context. For
-- example, if Amazon Lex isn't able to understand user input, it uses a
-- clarification prompt message.
--
-- When you create an intent you can assign messages to groups. When
-- messages are assigned to groups Amazon Lex returns one message from
-- each group in the response. The message field is an escaped JSON
-- string containing the messages. For more information about the
-- structure of the JSON string returned, see msg-prompts-formats.
--
-- If the Lambda function returns a message, Amazon Lex passes it to the
-- client in its response.
--
-- PostTextResponse, postTextResponse_messageFormat - The
-- format of the response message. One of the following values:
--
--
-- - PlainText - The message contains plain UTF-8 text.
-- - CustomPayload - The message is a custom format defined by
-- the Lambda function.
-- - SSML - The message contains text formatted for voice
-- output.
-- - Composite - The message contains an escaped JSON object
-- containing one or more messages from the groups that messages were
-- assigned to when the intent was created.
--
--
-- PostTextResponse, postTextResponse_nluIntentConfidence -
-- Provides a score that indicates how confident Amazon Lex is that the
-- returned intent is the one that matches the user's intent. The score
-- is between 0.0 and 1.0. For more information, see Confidence
-- Scores.
--
-- The score is a relative score, not an absolute score. The score may
-- change based on improvements to Amazon Lex.
--
-- $sel:responseCard:PostTextResponse',
-- postTextResponse_responseCard - Represents the options that the
-- user has to respond to the current prompt. Response Card can come from
-- the bot configuration (in the Amazon Lex console, choose the settings
-- button next to a slot) or from a code hook (Lambda function).
--
-- $sel:sentimentResponse:PostTextResponse',
-- postTextResponse_sentimentResponse - The sentiment expressed in
-- and utterance.
--
-- When the bot is configured to send utterances to Amazon Comprehend for
-- sentiment analysis, this field contains the result of the analysis.
--
-- PostText, postTextResponse_sessionAttributes - A map of
-- key-value pairs representing the session-specific context information.
--
-- $sel:sessionId:PostTextResponse',
-- postTextResponse_sessionId - A unique identifier for the
-- session.
--
-- PostTextResponse, postTextResponse_slotToElicit - If the
-- dialogState value is ElicitSlot, returns the name of
-- the slot for which Amazon Lex is eliciting a value.
--
-- PostTextResponse, postTextResponse_slots - The intent
-- slots that Amazon Lex detected from the user input in the
-- conversation.
--
-- Amazon Lex creates a resolution list containing likely values for a
-- slot. The value that it returns is determined by the
-- valueSelectionStrategy selected when the slot type was
-- created or updated. If valueSelectionStrategy is set to
-- ORIGINAL_VALUE, the value provided by the user is returned,
-- if the user value is similar to the slot values. If
-- valueSelectionStrategy is set to TOP_RESOLUTION
-- Amazon Lex returns the first value in the resolution list or, if there
-- is no resolution list, null. If you don't specify a
-- valueSelectionStrategy, the default is
-- ORIGINAL_VALUE.
--
-- $sel:httpStatus:PostTextResponse',
-- postTextResponse_httpStatus - The response's http status code.
newPostTextResponse :: Int -> PostTextResponse
-- | A list of active contexts for the session. A context can be set when
-- an intent is fulfilled or by calling the PostContent,
-- PostText, or PutSession operation.
--
-- You can use a context to control the intents that can follow up an
-- intent, or to modify the operation of your application.
postTextResponse_activeContexts :: Lens' PostTextResponse (Maybe [ActiveContext])
-- | One to four alternative intents that may be applicable to the user's
-- intent.
--
-- Each alternative includes a score that indicates how confident Amazon
-- Lex is that the intent matches the user's intent. The intents are
-- sorted by the confidence score.
postTextResponse_alternativeIntents :: Lens' PostTextResponse (Maybe [PredictedIntent])
-- | The version of the bot that responded to the conversation. You can use
-- this information to help determine if one version of a bot is
-- performing better than another version.
postTextResponse_botVersion :: Lens' PostTextResponse (Maybe Text)
-- | Identifies the current state of the user interaction. Amazon Lex
-- returns one of the following values as dialogState. The
-- client can optionally use this information to customize the user
-- interface.
--
--
-- - ElicitIntent - Amazon Lex wants to elicit user intent.For
-- example, a user might utter an intent ("I want to order a pizza"). If
-- Amazon Lex cannot infer the user intent from this utterance, it will
-- return this dialogState.
-- - ConfirmIntent - Amazon Lex is expecting a "yes" or "no"
-- response.For example, Amazon Lex wants user confirmation before
-- fulfilling an intent.Instead of a simple "yes" or "no," a user might
-- respond with additional information. For example, "yes, but make it
-- thick crust pizza" or "no, I want to order a drink". Amazon Lex can
-- process such additional information (in these examples, update the
-- crust type slot value, or change intent from OrderPizza to
-- OrderDrink).
-- - ElicitSlot - Amazon Lex is expecting a slot value for the
-- current intent.For example, suppose that in the response Amazon Lex
-- sends this message: "What size pizza would you like?". A user might
-- reply with the slot value (e.g., "medium"). The user might also
-- provide additional information in the response (e.g., "medium thick
-- crust pizza"). Amazon Lex can process such additional information
-- appropriately.
-- - Fulfilled - Conveys that the Lambda function configured
-- for the intent has successfully fulfilled the intent.
-- - ReadyForFulfillment - Conveys that the client has to
-- fulfill the intent.
-- - Failed - Conveys that the conversation with the user
-- failed.This can happen for various reasons including that the user did
-- not provide an appropriate response to prompts from the service (you
-- can configure how many times Amazon Lex can prompt a user for specific
-- information), or the Lambda function failed to fulfill the
-- intent.
--
postTextResponse_dialogState :: Lens' PostTextResponse (Maybe DialogState)
-- | The current user intent that Amazon Lex is aware of.
postTextResponse_intentName :: Lens' PostTextResponse (Maybe Text)
-- | The message to convey to the user. The message can come from the bot's
-- configuration or from a Lambda function.
--
-- If the intent is not configured with a Lambda function, or if the
-- Lambda function returned Delegate as the
-- dialogAction.type its response, Amazon Lex decides on the
-- next course of action and selects an appropriate message from the
-- bot's configuration based on the current interaction context. For
-- example, if Amazon Lex isn't able to understand user input, it uses a
-- clarification prompt message.
--
-- When you create an intent you can assign messages to groups. When
-- messages are assigned to groups Amazon Lex returns one message from
-- each group in the response. The message field is an escaped JSON
-- string containing the messages. For more information about the
-- structure of the JSON string returned, see msg-prompts-formats.
--
-- If the Lambda function returns a message, Amazon Lex passes it to the
-- client in its response.
postTextResponse_message :: Lens' PostTextResponse (Maybe Text)
-- | The format of the response message. One of the following values:
--
--
-- - PlainText - The message contains plain UTF-8 text.
-- - CustomPayload - The message is a custom format defined by
-- the Lambda function.
-- - SSML - The message contains text formatted for voice
-- output.
-- - Composite - The message contains an escaped JSON object
-- containing one or more messages from the groups that messages were
-- assigned to when the intent was created.
--
postTextResponse_messageFormat :: Lens' PostTextResponse (Maybe MessageFormatType)
-- | Provides a score that indicates how confident Amazon Lex is that the
-- returned intent is the one that matches the user's intent. The score
-- is between 0.0 and 1.0. For more information, see Confidence
-- Scores.
--
-- The score is a relative score, not an absolute score. The score may
-- change based on improvements to Amazon Lex.
postTextResponse_nluIntentConfidence :: Lens' PostTextResponse (Maybe IntentConfidence)
-- | Represents the options that the user has to respond to the current
-- prompt. Response Card can come from the bot configuration (in the
-- Amazon Lex console, choose the settings button next to a slot) or from
-- a code hook (Lambda function).
postTextResponse_responseCard :: Lens' PostTextResponse (Maybe ResponseCard)
-- | The sentiment expressed in and utterance.
--
-- When the bot is configured to send utterances to Amazon Comprehend for
-- sentiment analysis, this field contains the result of the analysis.
postTextResponse_sentimentResponse :: Lens' PostTextResponse (Maybe SentimentResponse)
-- | A map of key-value pairs representing the session-specific context
-- information.
postTextResponse_sessionAttributes :: Lens' PostTextResponse (Maybe (HashMap Text Text))
-- | A unique identifier for the session.
postTextResponse_sessionId :: Lens' PostTextResponse (Maybe Text)
-- | If the dialogState value is ElicitSlot, returns the
-- name of the slot for which Amazon Lex is eliciting a value.
postTextResponse_slotToElicit :: Lens' PostTextResponse (Maybe Text)
-- | The intent slots that Amazon Lex detected from the user input in the
-- conversation.
--
-- Amazon Lex creates a resolution list containing likely values for a
-- slot. The value that it returns is determined by the
-- valueSelectionStrategy selected when the slot type was
-- created or updated. If valueSelectionStrategy is set to
-- ORIGINAL_VALUE, the value provided by the user is returned,
-- if the user value is similar to the slot values. If
-- valueSelectionStrategy is set to TOP_RESOLUTION
-- Amazon Lex returns the first value in the resolution list or, if there
-- is no resolution list, null. If you don't specify a
-- valueSelectionStrategy, the default is
-- ORIGINAL_VALUE.
postTextResponse_slots :: Lens' PostTextResponse (Maybe (HashMap Text Text))
-- | The response's http status code.
postTextResponse_httpStatus :: Lens' PostTextResponse Int
instance GHC.Generics.Generic Amazonka.LexRuntime.PostText.PostText
instance GHC.Show.Show Amazonka.LexRuntime.PostText.PostText
instance GHC.Classes.Eq Amazonka.LexRuntime.PostText.PostText
instance GHC.Generics.Generic Amazonka.LexRuntime.PostText.PostTextResponse
instance GHC.Show.Show Amazonka.LexRuntime.PostText.PostTextResponse
instance GHC.Classes.Eq Amazonka.LexRuntime.PostText.PostTextResponse
instance Amazonka.Types.AWSRequest Amazonka.LexRuntime.PostText.PostText
instance Control.DeepSeq.NFData Amazonka.LexRuntime.PostText.PostTextResponse
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.PostText.PostText
instance Control.DeepSeq.NFData Amazonka.LexRuntime.PostText.PostText
instance Amazonka.Data.Headers.ToHeaders Amazonka.LexRuntime.PostText.PostText
instance Data.Aeson.Types.ToJSON.ToJSON Amazonka.LexRuntime.PostText.PostText
instance Amazonka.Data.Path.ToPath Amazonka.LexRuntime.PostText.PostText
instance Amazonka.Data.Query.ToQuery Amazonka.LexRuntime.PostText.PostText
-- | Sends user input (text or speech) to Amazon Lex. Clients use this API
-- to send text and audio requests to Amazon Lex at runtime. Amazon Lex
-- interprets the user input using the machine learning model that it
-- built for the bot.
--
-- The PostContent operation supports audio input at 8kHz and
-- 16kHz. You can use 8kHz audio to achieve higher speech recognition
-- accuracy in telephone audio applications.
--
-- In response, Amazon Lex returns the next message to convey to the
-- user. Consider the following example messages:
--
--
-- - For a user input "I would like a pizza," Amazon Lex might return a
-- response with a message eliciting slot data (for example,
-- PizzaSize): "What size pizza would you like?".
-- - After the user provides all of the pizza order information, Amazon
-- Lex might return a response with a message to get user confirmation:
-- "Order the pizza?".
-- - After the user replies "Yes" to the confirmation prompt, Amazon
-- Lex might return a conclusion statement: "Thank you, your cheese pizza
-- has been ordered.".
--
--
-- Not all Amazon Lex messages require a response from the user. For
-- example, conclusion statements do not require a response. Some
-- messages require only a yes or no response. In addition to the
-- message, Amazon Lex provides additional context about the
-- message in the response that you can use to enhance client behavior,
-- such as displaying the appropriate client user interface. Consider the
-- following examples:
--
--
-- - If the message is to elicit slot data, Amazon Lex returns the
-- following context information:
- x-amz-lex-dialog-state
-- header set to
-- ElicitSlot
- x-amz-lex-intent-name header set
-- to the intent name in the current
-- context
- x-amz-lex-slot-to-elicit header set to the
-- slot name for which the message is eliciting
-- information
- x-amz-lex-slots header set to a map of
-- slots configured for the intent with their current
-- values
-- - If the message is a confirmation prompt, the
-- x-amz-lex-dialog-state header is set to Confirmation
-- and the x-amz-lex-slot-to-elicit header is omitted.
-- - If the message is a clarification prompt configured for the
-- intent, indicating that the user intent is not understood, the
-- x-amz-dialog-state header is set to ElicitIntent and
-- the x-amz-slot-to-elicit header is omitted.
--
--
-- In addition, Amazon Lex also returns your application-specific
-- sessionAttributes. For more information, see Managing
-- Conversation Context.
module Amazonka.LexRuntime.PostContent
-- | See: newPostContent smart constructor.
data PostContent
PostContent' :: Maybe Text -> Maybe (Sensitive Text) -> Maybe (Sensitive Text) -> Maybe (Sensitive Text) -> Text -> Text -> Text -> Text -> HashedBody -> PostContent
-- | You pass this value as the Accept HTTP header.
--
-- The message Amazon Lex returns in the response can be either text or
-- speech based on the Accept HTTP header value in the request.
--
--
-- - If the value is text/plain; charset=utf-8, Amazon Lex
-- returns text in the response.
-- - If the value begins with audio/, Amazon Lex returns
-- speech in the response. Amazon Lex uses Amazon Polly to generate the
-- speech (using the configuration you specified in the Accept
-- header). For example, if you specify audio/mpeg as the value,
-- Amazon Lex returns speech in the MPEG format.
-- - If the value is audio/pcm, the speech returned is
-- audio/pcm in 16-bit, little endian format.
-- - The following are the accepted
-- values:
- audio/mpeg
- audio/ogg
- audio/pcm
- text/plain;
-- charset=utf-8
- audio/* (defaults to mpeg)
--
[$sel:accept:PostContent'] :: PostContent -> Maybe Text
-- | A list of contexts active for the request. A context can be activated
-- when a previous intent is fulfilled, or by including the context in
-- the request,
--
-- If you don't specify a list of contexts, Amazon Lex will use the
-- current list of contexts for the session. If you specify an empty
-- list, all contexts for the session are cleared.
[$sel:activeContexts:PostContent'] :: PostContent -> Maybe (Sensitive Text)
-- | You pass this value as the x-amz-lex-request-attributes HTTP
-- header.
--
-- Request-specific information passed between Amazon Lex and a client
-- application. The value must be a JSON serialized and base64 encoded
-- map with string keys and values. The total size of the
-- requestAttributes and sessionAttributes headers is
-- limited to 12 KB.
--
-- The namespace x-amz-lex: is reserved for special attributes.
-- Don't create any request attributes with the prefix
-- x-amz-lex:.
--
-- For more information, see Setting Request Attributes.
[$sel:requestAttributes:PostContent'] :: PostContent -> Maybe (Sensitive Text)
-- | You pass this value as the x-amz-lex-session-attributes HTTP
-- header.
--
-- Application-specific information passed between Amazon Lex and a
-- client application. The value must be a JSON serialized and base64
-- encoded map with string keys and values. The total size of the
-- sessionAttributes and requestAttributes headers is
-- limited to 12 KB.
--
-- For more information, see Setting Session Attributes.
[$sel:sessionAttributes:PostContent'] :: PostContent -> Maybe (Sensitive Text)
-- | Name of the Amazon Lex bot.
[$sel:botName:PostContent'] :: PostContent -> Text
-- | Alias of the Amazon Lex bot.
[$sel:botAlias:PostContent'] :: PostContent -> Text
-- | The ID of the client application user. Amazon Lex uses this to
-- identify a user's conversation with your bot. At runtime, each request
-- must contain the userID field.
--
-- To decide the user ID to use for your application, consider the
-- following factors.
--
--
-- - The userID field must not contain any personally
-- identifiable information of the user, for example, name, personal
-- identification numbers, or other end user personal information.
-- - If you want a user to start a conversation on one device and
-- continue on another device, use a user-specific identifier.
-- - If you want the same user to be able to have two independent
-- conversations on two different devices, choose a device-specific
-- identifier.
-- - A user can't have two independent conversations with two different
-- versions of the same bot. For example, a user can't have a
-- conversation with the PROD and BETA versions of the same bot. If you
-- anticipate that a user will need to have conversation with two
-- different versions, for example, while testing, include the bot alias
-- in the user ID to separate the two conversations.
--
[$sel:userId:PostContent'] :: PostContent -> Text
-- | You pass this value as the Content-Type HTTP header.
--
-- Indicates the audio format or text. The header value must start with
-- one of the following prefixes:
--
--
-- - PCM format, audio data must be in little-endian byte
-- order.
- audio/l16; rate=16000; channels=1
- audio/x-l16;
-- sample-rate=16000; channel-count=1
- audio/lpcm;
-- sample-rate=8000; sample-size-bits=16; channel-count=1;
-- is-big-endian=false
-- - Opus format
- audio/x-cbr-opus-with-preamble;
-- preamble-size=0; bit-rate=256000;
-- frame-size-milliseconds=4
-- - Text format
- text/plain; charset=utf-8
--
[$sel:contentType:PostContent'] :: PostContent -> Text
-- | User input in PCM or Opus audio format or text format as described in
-- the Content-Type HTTP header.
--
-- You can stream audio data to Amazon Lex or you can create a local
-- buffer that captures all of the audio data before sending. In general,
-- you get better performance if you stream audio data rather than
-- buffering the data locally.
[$sel:inputStream:PostContent'] :: PostContent -> HashedBody
-- | Create a value of PostContent with all optional fields omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:accept:PostContent', postContent_accept - You pass
-- this value as the Accept HTTP header.
--
-- The message Amazon Lex returns in the response can be either text or
-- speech based on the Accept HTTP header value in the request.
--
--
-- - If the value is text/plain; charset=utf-8, Amazon Lex
-- returns text in the response.
-- - If the value begins with audio/, Amazon Lex returns
-- speech in the response. Amazon Lex uses Amazon Polly to generate the
-- speech (using the configuration you specified in the Accept
-- header). For example, if you specify audio/mpeg as the value,
-- Amazon Lex returns speech in the MPEG format.
-- - If the value is audio/pcm, the speech returned is
-- audio/pcm in 16-bit, little endian format.
-- - The following are the accepted
-- values:
- audio/mpeg
- audio/ogg
- audio/pcm
- text/plain;
-- charset=utf-8
- audio/* (defaults to mpeg)
--
--
-- PostContent, postContent_activeContexts - A list of
-- contexts active for the request. A context can be activated when a
-- previous intent is fulfilled, or by including the context in the
-- request,
--
-- If you don't specify a list of contexts, Amazon Lex will use the
-- current list of contexts for the session. If you specify an empty
-- list, all contexts for the session are cleared.
--
-- $sel:requestAttributes:PostContent',
-- postContent_requestAttributes - You pass this value as the
-- x-amz-lex-request-attributes HTTP header.
--
-- Request-specific information passed between Amazon Lex and a client
-- application. The value must be a JSON serialized and base64 encoded
-- map with string keys and values. The total size of the
-- requestAttributes and sessionAttributes headers is
-- limited to 12 KB.
--
-- The namespace x-amz-lex: is reserved for special attributes.
-- Don't create any request attributes with the prefix
-- x-amz-lex:.
--
-- For more information, see Setting Request Attributes.
--
-- PostContent, postContent_sessionAttributes - You pass
-- this value as the x-amz-lex-session-attributes HTTP header.
--
-- Application-specific information passed between Amazon Lex and a
-- client application. The value must be a JSON serialized and base64
-- encoded map with string keys and values. The total size of the
-- sessionAttributes and requestAttributes headers is
-- limited to 12 KB.
--
-- For more information, see Setting Session Attributes.
--
-- $sel:botName:PostContent', postContent_botName - Name of
-- the Amazon Lex bot.
--
-- $sel:botAlias:PostContent', postContent_botAlias - Alias
-- of the Amazon Lex bot.
--
-- $sel:userId:PostContent', postContent_userId - The ID of
-- the client application user. Amazon Lex uses this to identify a user's
-- conversation with your bot. At runtime, each request must contain the
-- userID field.
--
-- To decide the user ID to use for your application, consider the
-- following factors.
--
--
-- - The userID field must not contain any personally
-- identifiable information of the user, for example, name, personal
-- identification numbers, or other end user personal information.
-- - If you want a user to start a conversation on one device and
-- continue on another device, use a user-specific identifier.
-- - If you want the same user to be able to have two independent
-- conversations on two different devices, choose a device-specific
-- identifier.
-- - A user can't have two independent conversations with two different
-- versions of the same bot. For example, a user can't have a
-- conversation with the PROD and BETA versions of the same bot. If you
-- anticipate that a user will need to have conversation with two
-- different versions, for example, while testing, include the bot alias
-- in the user ID to separate the two conversations.
--
--
-- PostContent, postContent_contentType - You pass this
-- value as the Content-Type HTTP header.
--
-- Indicates the audio format or text. The header value must start with
-- one of the following prefixes:
--
--
-- - PCM format, audio data must be in little-endian byte
-- order.
- audio/l16; rate=16000; channels=1
- audio/x-l16;
-- sample-rate=16000; channel-count=1
- audio/lpcm;
-- sample-rate=8000; sample-size-bits=16; channel-count=1;
-- is-big-endian=false
-- - Opus format
- audio/x-cbr-opus-with-preamble;
-- preamble-size=0; bit-rate=256000;
-- frame-size-milliseconds=4
-- - Text format
- text/plain; charset=utf-8
--
--
-- $sel:inputStream:PostContent', postContent_inputStream -
-- User input in PCM or Opus audio format or text format as described in
-- the Content-Type HTTP header.
--
-- You can stream audio data to Amazon Lex or you can create a local
-- buffer that captures all of the audio data before sending. In general,
-- you get better performance if you stream audio data rather than
-- buffering the data locally.
newPostContent :: Text -> Text -> Text -> Text -> HashedBody -> PostContent
-- | You pass this value as the Accept HTTP header.
--
-- The message Amazon Lex returns in the response can be either text or
-- speech based on the Accept HTTP header value in the request.
--
--
-- - If the value is text/plain; charset=utf-8, Amazon Lex
-- returns text in the response.
-- - If the value begins with audio/, Amazon Lex returns
-- speech in the response. Amazon Lex uses Amazon Polly to generate the
-- speech (using the configuration you specified in the Accept
-- header). For example, if you specify audio/mpeg as the value,
-- Amazon Lex returns speech in the MPEG format.
-- - If the value is audio/pcm, the speech returned is
-- audio/pcm in 16-bit, little endian format.
-- - The following are the accepted
-- values:
- audio/mpeg
- audio/ogg
- audio/pcm
- text/plain;
-- charset=utf-8
- audio/* (defaults to mpeg)
--
postContent_accept :: Lens' PostContent (Maybe Text)
-- | A list of contexts active for the request. A context can be activated
-- when a previous intent is fulfilled, or by including the context in
-- the request,
--
-- If you don't specify a list of contexts, Amazon Lex will use the
-- current list of contexts for the session. If you specify an empty
-- list, all contexts for the session are cleared.
postContent_activeContexts :: Lens' PostContent (Maybe Text)
-- | You pass this value as the x-amz-lex-request-attributes HTTP
-- header.
--
-- Request-specific information passed between Amazon Lex and a client
-- application. The value must be a JSON serialized and base64 encoded
-- map with string keys and values. The total size of the
-- requestAttributes and sessionAttributes headers is
-- limited to 12 KB.
--
-- The namespace x-amz-lex: is reserved for special attributes.
-- Don't create any request attributes with the prefix
-- x-amz-lex:.
--
-- For more information, see Setting Request Attributes.
postContent_requestAttributes :: Lens' PostContent (Maybe Text)
-- | You pass this value as the x-amz-lex-session-attributes HTTP
-- header.
--
-- Application-specific information passed between Amazon Lex and a
-- client application. The value must be a JSON serialized and base64
-- encoded map with string keys and values. The total size of the
-- sessionAttributes and requestAttributes headers is
-- limited to 12 KB.
--
-- For more information, see Setting Session Attributes.
postContent_sessionAttributes :: Lens' PostContent (Maybe Text)
-- | Name of the Amazon Lex bot.
postContent_botName :: Lens' PostContent Text
-- | Alias of the Amazon Lex bot.
postContent_botAlias :: Lens' PostContent Text
-- | The ID of the client application user. Amazon Lex uses this to
-- identify a user's conversation with your bot. At runtime, each request
-- must contain the userID field.
--
-- To decide the user ID to use for your application, consider the
-- following factors.
--
--
-- - The userID field must not contain any personally
-- identifiable information of the user, for example, name, personal
-- identification numbers, or other end user personal information.
-- - If you want a user to start a conversation on one device and
-- continue on another device, use a user-specific identifier.
-- - If you want the same user to be able to have two independent
-- conversations on two different devices, choose a device-specific
-- identifier.
-- - A user can't have two independent conversations with two different
-- versions of the same bot. For example, a user can't have a
-- conversation with the PROD and BETA versions of the same bot. If you
-- anticipate that a user will need to have conversation with two
-- different versions, for example, while testing, include the bot alias
-- in the user ID to separate the two conversations.
--
postContent_userId :: Lens' PostContent Text
-- | You pass this value as the Content-Type HTTP header.
--
-- Indicates the audio format or text. The header value must start with
-- one of the following prefixes:
--
--
-- - PCM format, audio data must be in little-endian byte
-- order.
- audio/l16; rate=16000; channels=1
- audio/x-l16;
-- sample-rate=16000; channel-count=1
- audio/lpcm;
-- sample-rate=8000; sample-size-bits=16; channel-count=1;
-- is-big-endian=false
-- - Opus format
- audio/x-cbr-opus-with-preamble;
-- preamble-size=0; bit-rate=256000;
-- frame-size-milliseconds=4
-- - Text format
- text/plain; charset=utf-8
--
postContent_contentType :: Lens' PostContent Text
-- | User input in PCM or Opus audio format or text format as described in
-- the Content-Type HTTP header.
--
-- You can stream audio data to Amazon Lex or you can create a local
-- buffer that captures all of the audio data before sending. In general,
-- you get better performance if you stream audio data rather than
-- buffering the data locally.
postContent_inputStream :: Lens' PostContent HashedBody
-- | See: newPostContentResponse smart constructor.
data PostContentResponse
PostContentResponse' :: Maybe (Sensitive Text) -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe DialogState -> Maybe (Sensitive Text) -> Maybe (Sensitive Text) -> Maybe Text -> Maybe Text -> Maybe (Sensitive Text) -> Maybe MessageFormatType -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Int -> ResponseBody -> PostContentResponse
-- | A list of active contexts for the session. A context can be set when
-- an intent is fulfilled or by calling the PostContent,
-- PostText, or PutSession operation.
--
-- You can use a context to control the intents that can follow up an
-- intent, or to modify the operation of your application.
[$sel:activeContexts:PostContentResponse'] :: PostContentResponse -> Maybe (Sensitive Text)
-- | One to four alternative intents that may be applicable to the user's
-- intent.
--
-- Each alternative includes a score that indicates how confident Amazon
-- Lex is that the intent matches the user's intent. The intents are
-- sorted by the confidence score.
[$sel:alternativeIntents:PostContentResponse'] :: PostContentResponse -> Maybe Text
-- | The version of the bot that responded to the conversation. You can use
-- this information to help determine if one version of a bot is
-- performing better than another version.
[$sel:botVersion:PostContentResponse'] :: PostContentResponse -> Maybe Text
-- | Content type as specified in the Accept HTTP header in the
-- request.
[$sel:contentType:PostContentResponse'] :: PostContentResponse -> Maybe Text
-- | Identifies the current state of the user interaction. Amazon Lex
-- returns one of the following values as dialogState. The
-- client can optionally use this information to customize the user
-- interface.
--
--
-- - ElicitIntent - Amazon Lex wants to elicit the user's
-- intent. Consider the following examples:For example, a user might
-- utter an intent ("I want to order a pizza"). If Amazon Lex cannot
-- infer the user intent from this utterance, it will return this dialog
-- state.
-- - ConfirmIntent - Amazon Lex is expecting a "yes" or "no"
-- response.For example, Amazon Lex wants user confirmation before
-- fulfilling an intent. Instead of a simple "yes" or "no" response, a
-- user might respond with additional information. For example, "yes, but
-- make it a thick crust pizza" or "no, I want to order a drink." Amazon
-- Lex can process such additional information (in these examples, update
-- the crust type slot or change the intent from OrderPizza to
-- OrderDrink).
-- - ElicitSlot - Amazon Lex is expecting the value of a slot
-- for the current intent.For example, suppose that in the response
-- Amazon Lex sends this message: "What size pizza would you like?". A
-- user might reply with the slot value (e.g., "medium"). The user might
-- also provide additional information in the response (e.g., "medium
-- thick crust pizza"). Amazon Lex can process such additional
-- information appropriately.
-- - Fulfilled - Conveys that the Lambda function has
-- successfully fulfilled the intent.
-- - ReadyForFulfillment - Conveys that the client has to
-- fulfill the request.
-- - Failed - Conveys that the conversation with the user
-- failed.This can happen for various reasons, including that the user
-- does not provide an appropriate response to prompts from the service
-- (you can configure how many times Amazon Lex can prompt a user for
-- specific information), or if the Lambda function fails to fulfill the
-- intent.
--
[$sel:dialogState:PostContentResponse'] :: PostContentResponse -> Maybe DialogState
-- | The text used to process the request.
--
-- If the input was an audio stream, the encodedInputTranscript
-- field contains the text extracted from the audio stream. This is the
-- text that is actually processed to recognize intents and slot values.
-- You can use this information to determine if Amazon Lex is correctly
-- processing the audio that you send.
--
-- The encodedInputTranscript field is base-64 encoded. You must
-- decode the field before you can use the value.
[$sel:encodedInputTranscript:PostContentResponse'] :: PostContentResponse -> Maybe (Sensitive Text)
-- | The message to convey to the user. The message can come from the bot's
-- configuration or from a Lambda function.
--
-- If the intent is not configured with a Lambda function, or if the
-- Lambda function returned Delegate as the
-- dialogAction.type in its response, Amazon Lex decides on the
-- next course of action and selects an appropriate message from the
-- bot's configuration based on the current interaction context. For
-- example, if Amazon Lex isn't able to understand user input, it uses a
-- clarification prompt message.
--
-- When you create an intent you can assign messages to groups. When
-- messages are assigned to groups Amazon Lex returns one message from
-- each group in the response. The message field is an escaped JSON
-- string containing the messages. For more information about the
-- structure of the JSON string returned, see msg-prompts-formats.
--
-- If the Lambda function returns a message, Amazon Lex passes it to the
-- client in its response.
--
-- The encodedMessage field is base-64 encoded. You must decode
-- the field before you can use the value.
[$sel:encodedMessage:PostContentResponse'] :: PostContentResponse -> Maybe (Sensitive Text)
-- | The text used to process the request.
--
-- You can use this field only in the de-DE, en-AU, en-GB, en-US, es-419,
-- es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales,
-- the inputTranscript field is null. You should use the
-- encodedInputTranscript field instead.
--
-- If the input was an audio stream, the inputTranscript field
-- contains the text extracted from the audio stream. This is the text
-- that is actually processed to recognize intents and slot values. You
-- can use this information to determine if Amazon Lex is correctly
-- processing the audio that you send.
[$sel:inputTranscript:PostContentResponse'] :: PostContentResponse -> Maybe Text
-- | Current user intent that Amazon Lex is aware of.
[$sel:intentName:PostContentResponse'] :: PostContentResponse -> Maybe Text
-- | You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419,
-- es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales,
-- the message field is null. You should use the
-- encodedMessage field instead.
--
-- The message to convey to the user. The message can come from the bot's
-- configuration or from a Lambda function.
--
-- If the intent is not configured with a Lambda function, or if the
-- Lambda function returned Delegate as the
-- dialogAction.type in its response, Amazon Lex decides on the
-- next course of action and selects an appropriate message from the
-- bot's configuration based on the current interaction context. For
-- example, if Amazon Lex isn't able to understand user input, it uses a
-- clarification prompt message.
--
-- When you create an intent you can assign messages to groups. When
-- messages are assigned to groups Amazon Lex returns one message from
-- each group in the response. The message field is an escaped JSON
-- string containing the messages. For more information about the
-- structure of the JSON string returned, see msg-prompts-formats.
--
-- If the Lambda function returns a message, Amazon Lex passes it to the
-- client in its response.
[$sel:message:PostContentResponse'] :: PostContentResponse -> Maybe (Sensitive Text)
-- | The format of the response message. One of the following values:
--
--
-- - 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 from the groups that messages were
-- assigned to when the intent was created.
--
[$sel:messageFormat:PostContentResponse'] :: PostContentResponse -> Maybe MessageFormatType
-- | Provides a score that indicates how confident Amazon Lex is that the
-- returned intent is the one that matches the user's intent. The score
-- is between 0.0 and 1.0.
--
-- The score is a relative score, not an absolute score. The score may
-- change based on improvements to Amazon Lex.
[$sel:nluIntentConfidence:PostContentResponse'] :: PostContentResponse -> Maybe Text
-- | The sentiment expressed in an utterance.
--
-- When the bot is configured to send utterances to Amazon Comprehend for
-- sentiment analysis, this field contains the result of the analysis.
[$sel:sentimentResponse:PostContentResponse'] :: PostContentResponse -> Maybe Text
-- | Map of key/value pairs representing the session-specific context
-- information.
[$sel:sessionAttributes:PostContentResponse'] :: PostContentResponse -> Maybe Text
-- | The unique identifier for the session.
[$sel:sessionId:PostContentResponse'] :: PostContentResponse -> Maybe Text
-- | If the dialogState value is ElicitSlot, returns the
-- name of the slot for which Amazon Lex is eliciting a value.
[$sel:slotToElicit:PostContentResponse'] :: PostContentResponse -> Maybe Text
-- | Map of zero or more intent slots (name/value pairs) Amazon Lex
-- detected from the user input during the conversation. The field is
-- base-64 encoded.
--
-- Amazon Lex creates a resolution list containing likely values for a
-- slot. The value that it returns is determined by the
-- valueSelectionStrategy selected when the slot type was
-- created or updated. If valueSelectionStrategy is set to
-- ORIGINAL_VALUE, the value provided by the user is returned,
-- if the user value is similar to the slot values. If
-- valueSelectionStrategy is set to TOP_RESOLUTION
-- Amazon Lex returns the first value in the resolution list or, if there
-- is no resolution list, null. If you don't specify a
-- valueSelectionStrategy, the default is
-- ORIGINAL_VALUE.
[$sel:slots:PostContentResponse'] :: PostContentResponse -> Maybe Text
-- | The response's http status code.
[$sel:httpStatus:PostContentResponse'] :: PostContentResponse -> Int
-- | The prompt (or statement) to convey to the user. This is based on the
-- bot configuration and context. For example, if Amazon Lex did not
-- understand the user intent, it sends the clarificationPrompt
-- configured for the bot. If the intent requires confirmation before
-- taking the fulfillment action, it sends the
-- confirmationPrompt. Another example: Suppose that the Lambda
-- function successfully fulfilled the intent, and sent a message to
-- convey to the user. Then Amazon Lex sends that message in the
-- response.
[$sel:audioStream:PostContentResponse'] :: PostContentResponse -> ResponseBody
-- | Create a value of PostContentResponse with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- PostContent, postContentResponse_activeContexts - A list
-- of active contexts for the session. A context can be set when an
-- intent is fulfilled or by calling the PostContent,
-- PostText, or PutSession operation.
--
-- You can use a context to control the intents that can follow up an
-- intent, or to modify the operation of your application.
--
-- $sel:alternativeIntents:PostContentResponse',
-- postContentResponse_alternativeIntents - One to four
-- alternative intents that may be applicable to the user's intent.
--
-- Each alternative includes a score that indicates how confident Amazon
-- Lex is that the intent matches the user's intent. The intents are
-- sorted by the confidence score.
--
-- $sel:botVersion:PostContentResponse',
-- postContentResponse_botVersion - The version of the bot that
-- responded to the conversation. You can use this information to help
-- determine if one version of a bot is performing better than another
-- version.
--
-- PostContent, postContentResponse_contentType - Content
-- type as specified in the Accept HTTP header in the request.
--
-- $sel:dialogState:PostContentResponse',
-- postContentResponse_dialogState - Identifies the current state
-- of the user interaction. Amazon Lex returns one of the following
-- values as dialogState. The client can optionally use this
-- information to customize the user interface.
--
--
-- - ElicitIntent - Amazon Lex wants to elicit the user's
-- intent. Consider the following examples:For example, a user might
-- utter an intent ("I want to order a pizza"). If Amazon Lex cannot
-- infer the user intent from this utterance, it will return this dialog
-- state.
-- - ConfirmIntent - Amazon Lex is expecting a "yes" or "no"
-- response.For example, Amazon Lex wants user confirmation before
-- fulfilling an intent. Instead of a simple "yes" or "no" response, a
-- user might respond with additional information. For example, "yes, but
-- make it a thick crust pizza" or "no, I want to order a drink." Amazon
-- Lex can process such additional information (in these examples, update
-- the crust type slot or change the intent from OrderPizza to
-- OrderDrink).
-- - ElicitSlot - Amazon Lex is expecting the value of a slot
-- for the current intent.For example, suppose that in the response
-- Amazon Lex sends this message: "What size pizza would you like?". A
-- user might reply with the slot value (e.g., "medium"). The user might
-- also provide additional information in the response (e.g., "medium
-- thick crust pizza"). Amazon Lex can process such additional
-- information appropriately.
-- - Fulfilled - Conveys that the Lambda function has
-- successfully fulfilled the intent.
-- - ReadyForFulfillment - Conveys that the client has to
-- fulfill the request.
-- - Failed - Conveys that the conversation with the user
-- failed.This can happen for various reasons, including that the user
-- does not provide an appropriate response to prompts from the service
-- (you can configure how many times Amazon Lex can prompt a user for
-- specific information), or if the Lambda function fails to fulfill the
-- intent.
--
--
-- $sel:encodedInputTranscript:PostContentResponse',
-- postContentResponse_encodedInputTranscript - The text used to
-- process the request.
--
-- If the input was an audio stream, the encodedInputTranscript
-- field contains the text extracted from the audio stream. This is the
-- text that is actually processed to recognize intents and slot values.
-- You can use this information to determine if Amazon Lex is correctly
-- processing the audio that you send.
--
-- The encodedInputTranscript field is base-64 encoded. You must
-- decode the field before you can use the value.
--
-- $sel:encodedMessage:PostContentResponse',
-- postContentResponse_encodedMessage - The message to convey to
-- the user. The message can come from the bot's configuration or from a
-- Lambda function.
--
-- If the intent is not configured with a Lambda function, or if the
-- Lambda function returned Delegate as the
-- dialogAction.type in its response, Amazon Lex decides on the
-- next course of action and selects an appropriate message from the
-- bot's configuration based on the current interaction context. For
-- example, if Amazon Lex isn't able to understand user input, it uses a
-- clarification prompt message.
--
-- When you create an intent you can assign messages to groups. When
-- messages are assigned to groups Amazon Lex returns one message from
-- each group in the response. The message field is an escaped JSON
-- string containing the messages. For more information about the
-- structure of the JSON string returned, see msg-prompts-formats.
--
-- If the Lambda function returns a message, Amazon Lex passes it to the
-- client in its response.
--
-- The encodedMessage field is base-64 encoded. You must decode
-- the field before you can use the value.
--
-- $sel:inputTranscript:PostContentResponse',
-- postContentResponse_inputTranscript - The text used to process
-- the request.
--
-- You can use this field only in the de-DE, en-AU, en-GB, en-US, es-419,
-- es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales,
-- the inputTranscript field is null. You should use the
-- encodedInputTranscript field instead.
--
-- If the input was an audio stream, the inputTranscript field
-- contains the text extracted from the audio stream. This is the text
-- that is actually processed to recognize intents and slot values. You
-- can use this information to determine if Amazon Lex is correctly
-- processing the audio that you send.
--
-- PostContentResponse, postContentResponse_intentName -
-- Current user intent that Amazon Lex is aware of.
--
-- PostContentResponse, postContentResponse_message - You
-- can only use this field in the de-DE, en-AU, en-GB, en-US, es-419,
-- es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales,
-- the message field is null. You should use the
-- encodedMessage field instead.
--
-- The message to convey to the user. The message can come from the bot's
-- configuration or from a Lambda function.
--
-- If the intent is not configured with a Lambda function, or if the
-- Lambda function returned Delegate as the
-- dialogAction.type in its response, Amazon Lex decides on the
-- next course of action and selects an appropriate message from the
-- bot's configuration based on the current interaction context. For
-- example, if Amazon Lex isn't able to understand user input, it uses a
-- clarification prompt message.
--
-- When you create an intent you can assign messages to groups. When
-- messages are assigned to groups Amazon Lex returns one message from
-- each group in the response. The message field is an escaped JSON
-- string containing the messages. For more information about the
-- structure of the JSON string returned, see msg-prompts-formats.
--
-- If the Lambda function returns a message, Amazon Lex passes it to the
-- client in its response.
--
-- PostContentResponse, postContentResponse_messageFormat -
-- The format of the response message. One of the following values:
--
--
-- - 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 from the groups that messages were
-- assigned to when the intent was created.
--
--
-- PostContentResponse,
-- postContentResponse_nluIntentConfidence - Provides a score that
-- indicates how confident Amazon Lex is that the returned intent is the
-- one that matches the user's intent. The score is between 0.0 and 1.0.
--
-- The score is a relative score, not an absolute score. The score may
-- change based on improvements to Amazon Lex.
--
-- $sel:sentimentResponse:PostContentResponse',
-- postContentResponse_sentimentResponse - The sentiment expressed
-- in an utterance.
--
-- When the bot is configured to send utterances to Amazon Comprehend for
-- sentiment analysis, this field contains the result of the analysis.
--
-- PostContent, postContentResponse_sessionAttributes - Map
-- of key/value pairs representing the session-specific context
-- information.
--
-- $sel:sessionId:PostContentResponse',
-- postContentResponse_sessionId - The unique identifier for the
-- session.
--
-- PostContentResponse, postContentResponse_slotToElicit -
-- If the dialogState value is ElicitSlot, returns the
-- name of the slot for which Amazon Lex is eliciting a value.
--
-- PostContentResponse, postContentResponse_slots - Map of
-- zero or more intent slots (name/value pairs) Amazon Lex detected from
-- the user input during the conversation. The field is base-64 encoded.
--
-- Amazon Lex creates a resolution list containing likely values for a
-- slot. The value that it returns is determined by the
-- valueSelectionStrategy selected when the slot type was
-- created or updated. If valueSelectionStrategy is set to
-- ORIGINAL_VALUE, the value provided by the user is returned,
-- if the user value is similar to the slot values. If
-- valueSelectionStrategy is set to TOP_RESOLUTION
-- Amazon Lex returns the first value in the resolution list or, if there
-- is no resolution list, null. If you don't specify a
-- valueSelectionStrategy, the default is
-- ORIGINAL_VALUE.
--
-- $sel:httpStatus:PostContentResponse',
-- postContentResponse_httpStatus - The response's http status
-- code.
--
-- $sel:audioStream:PostContentResponse',
-- postContentResponse_audioStream - The prompt (or statement) to
-- convey to the user. This is based on the bot configuration and
-- context. For example, if Amazon Lex did not understand the user
-- intent, it sends the clarificationPrompt configured for the
-- bot. If the intent requires confirmation before taking the fulfillment
-- action, it sends the confirmationPrompt. Another example:
-- Suppose that the Lambda function successfully fulfilled the intent,
-- and sent a message to convey to the user. Then Amazon Lex sends that
-- message in the response.
newPostContentResponse :: Int -> ResponseBody -> PostContentResponse
-- | A list of active contexts for the session. A context can be set when
-- an intent is fulfilled or by calling the PostContent,
-- PostText, or PutSession operation.
--
-- You can use a context to control the intents that can follow up an
-- intent, or to modify the operation of your application.
postContentResponse_activeContexts :: Lens' PostContentResponse (Maybe Text)
-- | One to four alternative intents that may be applicable to the user's
-- intent.
--
-- Each alternative includes a score that indicates how confident Amazon
-- Lex is that the intent matches the user's intent. The intents are
-- sorted by the confidence score.
postContentResponse_alternativeIntents :: Lens' PostContentResponse (Maybe Text)
-- | The version of the bot that responded to the conversation. You can use
-- this information to help determine if one version of a bot is
-- performing better than another version.
postContentResponse_botVersion :: Lens' PostContentResponse (Maybe Text)
-- | Content type as specified in the Accept HTTP header in the
-- request.
postContentResponse_contentType :: Lens' PostContentResponse (Maybe Text)
-- | Identifies the current state of the user interaction. Amazon Lex
-- returns one of the following values as dialogState. The
-- client can optionally use this information to customize the user
-- interface.
--
--
-- - ElicitIntent - Amazon Lex wants to elicit the user's
-- intent. Consider the following examples:For example, a user might
-- utter an intent ("I want to order a pizza"). If Amazon Lex cannot
-- infer the user intent from this utterance, it will return this dialog
-- state.
-- - ConfirmIntent - Amazon Lex is expecting a "yes" or "no"
-- response.For example, Amazon Lex wants user confirmation before
-- fulfilling an intent. Instead of a simple "yes" or "no" response, a
-- user might respond with additional information. For example, "yes, but
-- make it a thick crust pizza" or "no, I want to order a drink." Amazon
-- Lex can process such additional information (in these examples, update
-- the crust type slot or change the intent from OrderPizza to
-- OrderDrink).
-- - ElicitSlot - Amazon Lex is expecting the value of a slot
-- for the current intent.For example, suppose that in the response
-- Amazon Lex sends this message: "What size pizza would you like?". A
-- user might reply with the slot value (e.g., "medium"). The user might
-- also provide additional information in the response (e.g., "medium
-- thick crust pizza"). Amazon Lex can process such additional
-- information appropriately.
-- - Fulfilled - Conveys that the Lambda function has
-- successfully fulfilled the intent.
-- - ReadyForFulfillment - Conveys that the client has to
-- fulfill the request.
-- - Failed - Conveys that the conversation with the user
-- failed.This can happen for various reasons, including that the user
-- does not provide an appropriate response to prompts from the service
-- (you can configure how many times Amazon Lex can prompt a user for
-- specific information), or if the Lambda function fails to fulfill the
-- intent.
--
postContentResponse_dialogState :: Lens' PostContentResponse (Maybe DialogState)
-- | The text used to process the request.
--
-- If the input was an audio stream, the encodedInputTranscript
-- field contains the text extracted from the audio stream. This is the
-- text that is actually processed to recognize intents and slot values.
-- You can use this information to determine if Amazon Lex is correctly
-- processing the audio that you send.
--
-- The encodedInputTranscript field is base-64 encoded. You must
-- decode the field before you can use the value.
postContentResponse_encodedInputTranscript :: Lens' PostContentResponse (Maybe Text)
-- | The message to convey to the user. The message can come from the bot's
-- configuration or from a Lambda function.
--
-- If the intent is not configured with a Lambda function, or if the
-- Lambda function returned Delegate as the
-- dialogAction.type in its response, Amazon Lex decides on the
-- next course of action and selects an appropriate message from the
-- bot's configuration based on the current interaction context. For
-- example, if Amazon Lex isn't able to understand user input, it uses a
-- clarification prompt message.
--
-- When you create an intent you can assign messages to groups. When
-- messages are assigned to groups Amazon Lex returns one message from
-- each group in the response. The message field is an escaped JSON
-- string containing the messages. For more information about the
-- structure of the JSON string returned, see msg-prompts-formats.
--
-- If the Lambda function returns a message, Amazon Lex passes it to the
-- client in its response.
--
-- The encodedMessage field is base-64 encoded. You must decode
-- the field before you can use the value.
postContentResponse_encodedMessage :: Lens' PostContentResponse (Maybe Text)
-- | The text used to process the request.
--
-- You can use this field only in the de-DE, en-AU, en-GB, en-US, es-419,
-- es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales,
-- the inputTranscript field is null. You should use the
-- encodedInputTranscript field instead.
--
-- If the input was an audio stream, the inputTranscript field
-- contains the text extracted from the audio stream. This is the text
-- that is actually processed to recognize intents and slot values. You
-- can use this information to determine if Amazon Lex is correctly
-- processing the audio that you send.
postContentResponse_inputTranscript :: Lens' PostContentResponse (Maybe Text)
-- | Current user intent that Amazon Lex is aware of.
postContentResponse_intentName :: Lens' PostContentResponse (Maybe Text)
-- | You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419,
-- es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales,
-- the message field is null. You should use the
-- encodedMessage field instead.
--
-- The message to convey to the user. The message can come from the bot's
-- configuration or from a Lambda function.
--
-- If the intent is not configured with a Lambda function, or if the
-- Lambda function returned Delegate as the
-- dialogAction.type in its response, Amazon Lex decides on the
-- next course of action and selects an appropriate message from the
-- bot's configuration based on the current interaction context. For
-- example, if Amazon Lex isn't able to understand user input, it uses a
-- clarification prompt message.
--
-- When you create an intent you can assign messages to groups. When
-- messages are assigned to groups Amazon Lex returns one message from
-- each group in the response. The message field is an escaped JSON
-- string containing the messages. For more information about the
-- structure of the JSON string returned, see msg-prompts-formats.
--
-- If the Lambda function returns a message, Amazon Lex passes it to the
-- client in its response.
postContentResponse_message :: Lens' PostContentResponse (Maybe Text)
-- | The format of the response message. One of the following values:
--
--
-- - 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 from the groups that messages were
-- assigned to when the intent was created.
--
postContentResponse_messageFormat :: Lens' PostContentResponse (Maybe MessageFormatType)
-- | Provides a score that indicates how confident Amazon Lex is that the
-- returned intent is the one that matches the user's intent. The score
-- is between 0.0 and 1.0.
--
-- The score is a relative score, not an absolute score. The score may
-- change based on improvements to Amazon Lex.
postContentResponse_nluIntentConfidence :: Lens' PostContentResponse (Maybe Text)
-- | The sentiment expressed in an utterance.
--
-- When the bot is configured to send utterances to Amazon Comprehend for
-- sentiment analysis, this field contains the result of the analysis.
postContentResponse_sentimentResponse :: Lens' PostContentResponse (Maybe Text)
-- | Map of key/value pairs representing the session-specific context
-- information.
postContentResponse_sessionAttributes :: Lens' PostContentResponse (Maybe Text)
-- | The unique identifier for the session.
postContentResponse_sessionId :: Lens' PostContentResponse (Maybe Text)
-- | If the dialogState value is ElicitSlot, returns the
-- name of the slot for which Amazon Lex is eliciting a value.
postContentResponse_slotToElicit :: Lens' PostContentResponse (Maybe Text)
-- | Map of zero or more intent slots (name/value pairs) Amazon Lex
-- detected from the user input during the conversation. The field is
-- base-64 encoded.
--
-- Amazon Lex creates a resolution list containing likely values for a
-- slot. The value that it returns is determined by the
-- valueSelectionStrategy selected when the slot type was
-- created or updated. If valueSelectionStrategy is set to
-- ORIGINAL_VALUE, the value provided by the user is returned,
-- if the user value is similar to the slot values. If
-- valueSelectionStrategy is set to TOP_RESOLUTION
-- Amazon Lex returns the first value in the resolution list or, if there
-- is no resolution list, null. If you don't specify a
-- valueSelectionStrategy, the default is
-- ORIGINAL_VALUE.
postContentResponse_slots :: Lens' PostContentResponse (Maybe Text)
-- | The response's http status code.
postContentResponse_httpStatus :: Lens' PostContentResponse Int
-- | The prompt (or statement) to convey to the user. This is based on the
-- bot configuration and context. For example, if Amazon Lex did not
-- understand the user intent, it sends the clarificationPrompt
-- configured for the bot. If the intent requires confirmation before
-- taking the fulfillment action, it sends the
-- confirmationPrompt. Another example: Suppose that the Lambda
-- function successfully fulfilled the intent, and sent a message to
-- convey to the user. Then Amazon Lex sends that message in the
-- response.
postContentResponse_audioStream :: Lens' PostContentResponse ResponseBody
instance GHC.Generics.Generic Amazonka.LexRuntime.PostContent.PostContent
instance GHC.Show.Show Amazonka.LexRuntime.PostContent.PostContent
instance GHC.Generics.Generic Amazonka.LexRuntime.PostContent.PostContentResponse
instance GHC.Show.Show Amazonka.LexRuntime.PostContent.PostContentResponse
instance Amazonka.Types.AWSRequest Amazonka.LexRuntime.PostContent.PostContent
instance Amazonka.Data.Body.ToBody Amazonka.LexRuntime.PostContent.PostContent
instance Amazonka.Data.Headers.ToHeaders Amazonka.LexRuntime.PostContent.PostContent
instance Amazonka.Data.Path.ToPath Amazonka.LexRuntime.PostContent.PostContent
instance Amazonka.Data.Query.ToQuery Amazonka.LexRuntime.PostContent.PostContent
-- | Returns session information for a specified bot, alias, and user ID.
module Amazonka.LexRuntime.GetSession
-- | See: newGetSession smart constructor.
data GetSession
GetSession' :: Maybe Text -> Text -> Text -> Text -> GetSession
-- | A string used to filter the intents returned in the
-- recentIntentSummaryView structure.
--
-- When you specify a filter, only intents with their
-- checkpointLabel field set to that string are returned.
[$sel:checkpointLabelFilter:GetSession'] :: GetSession -> Maybe Text
-- | The name of the bot that contains the session data.
[$sel:botName:GetSession'] :: GetSession -> Text
-- | The alias in use for the bot that contains the session data.
[$sel:botAlias:GetSession'] :: GetSession -> Text
-- | The ID of the client application user. Amazon Lex uses this to
-- identify a user's conversation with your bot.
[$sel:userId:GetSession'] :: GetSession -> Text
-- | Create a value of GetSession with all optional fields omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:checkpointLabelFilter:GetSession',
-- getSession_checkpointLabelFilter - A string used to filter the
-- intents returned in the recentIntentSummaryView structure.
--
-- When you specify a filter, only intents with their
-- checkpointLabel field set to that string are returned.
--
-- $sel:botName:GetSession', getSession_botName - The name
-- of the bot that contains the session data.
--
-- $sel:botAlias:GetSession', getSession_botAlias - The
-- alias in use for the bot that contains the session data.
--
-- $sel:userId:GetSession', getSession_userId - The ID of
-- the client application user. Amazon Lex uses this to identify a user's
-- conversation with your bot.
newGetSession :: Text -> Text -> Text -> GetSession
-- | A string used to filter the intents returned in the
-- recentIntentSummaryView structure.
--
-- When you specify a filter, only intents with their
-- checkpointLabel field set to that string are returned.
getSession_checkpointLabelFilter :: Lens' GetSession (Maybe Text)
-- | The name of the bot that contains the session data.
getSession_botName :: Lens' GetSession Text
-- | The alias in use for the bot that contains the session data.
getSession_botAlias :: Lens' GetSession Text
-- | The ID of the client application user. Amazon Lex uses this to
-- identify a user's conversation with your bot.
getSession_userId :: Lens' GetSession Text
-- | See: newGetSessionResponse smart constructor.
data GetSessionResponse
GetSessionResponse' :: Maybe (Sensitive [ActiveContext]) -> Maybe DialogAction -> Maybe [IntentSummary] -> Maybe (Sensitive (HashMap Text Text)) -> Maybe Text -> Int -> GetSessionResponse
-- | A list of active contexts for the session. A context can be set when
-- an intent is fulfilled or by calling the PostContent,
-- PostText, or PutSession operation.
--
-- You can use a context to control the intents that can follow up an
-- intent, or to modify the operation of your application.
[$sel:activeContexts:GetSessionResponse'] :: GetSessionResponse -> Maybe (Sensitive [ActiveContext])
-- | Describes the current state of the bot.
[$sel:dialogAction:GetSessionResponse'] :: GetSessionResponse -> Maybe DialogAction
-- | An array of information about the intents used in the session. The
-- array can contain a maximum of three summaries. If more than three
-- intents are used in the session, the recentIntentSummaryView
-- operation contains information about the last three intents used.
--
-- If you set the checkpointLabelFilter parameter in the
-- request, the array contains only the intents with the specified label.
[$sel:recentIntentSummaryView:GetSessionResponse'] :: GetSessionResponse -> Maybe [IntentSummary]
-- | Map of key/value pairs representing the session-specific context
-- information. It contains application information passed between Amazon
-- Lex and a client application.
[$sel:sessionAttributes:GetSessionResponse'] :: GetSessionResponse -> Maybe (Sensitive (HashMap Text Text))
-- | A unique identifier for the session.
[$sel:sessionId:GetSessionResponse'] :: GetSessionResponse -> Maybe Text
-- | The response's http status code.
[$sel:httpStatus:GetSessionResponse'] :: GetSessionResponse -> Int
-- | Create a value of GetSessionResponse with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:activeContexts:GetSessionResponse',
-- getSessionResponse_activeContexts - A list of active contexts
-- for the session. A context can be set when an intent is fulfilled or
-- by calling the PostContent, PostText, or
-- PutSession operation.
--
-- You can use a context to control the intents that can follow up an
-- intent, or to modify the operation of your application.
--
-- $sel:dialogAction:GetSessionResponse',
-- getSessionResponse_dialogAction - Describes the current state
-- of the bot.
--
-- $sel:recentIntentSummaryView:GetSessionResponse',
-- getSessionResponse_recentIntentSummaryView - An array of
-- information about the intents used in the session. The array can
-- contain a maximum of three summaries. If more than three intents are
-- used in the session, the recentIntentSummaryView operation
-- contains information about the last three intents used.
--
-- If you set the checkpointLabelFilter parameter in the
-- request, the array contains only the intents with the specified label.
--
-- $sel:sessionAttributes:GetSessionResponse',
-- getSessionResponse_sessionAttributes - Map of key/value pairs
-- representing the session-specific context information. It contains
-- application information passed between Amazon Lex and a client
-- application.
--
-- $sel:sessionId:GetSessionResponse',
-- getSessionResponse_sessionId - A unique identifier for the
-- session.
--
-- $sel:httpStatus:GetSessionResponse',
-- getSessionResponse_httpStatus - The response's http status
-- code.
newGetSessionResponse :: Int -> GetSessionResponse
-- | A list of active contexts for the session. A context can be set when
-- an intent is fulfilled or by calling the PostContent,
-- PostText, or PutSession operation.
--
-- You can use a context to control the intents that can follow up an
-- intent, or to modify the operation of your application.
getSessionResponse_activeContexts :: Lens' GetSessionResponse (Maybe [ActiveContext])
-- | Describes the current state of the bot.
getSessionResponse_dialogAction :: Lens' GetSessionResponse (Maybe DialogAction)
-- | An array of information about the intents used in the session. The
-- array can contain a maximum of three summaries. If more than three
-- intents are used in the session, the recentIntentSummaryView
-- operation contains information about the last three intents used.
--
-- If you set the checkpointLabelFilter parameter in the
-- request, the array contains only the intents with the specified label.
getSessionResponse_recentIntentSummaryView :: Lens' GetSessionResponse (Maybe [IntentSummary])
-- | Map of key/value pairs representing the session-specific context
-- information. It contains application information passed between Amazon
-- Lex and a client application.
getSessionResponse_sessionAttributes :: Lens' GetSessionResponse (Maybe (HashMap Text Text))
-- | A unique identifier for the session.
getSessionResponse_sessionId :: Lens' GetSessionResponse (Maybe Text)
-- | The response's http status code.
getSessionResponse_httpStatus :: Lens' GetSessionResponse Int
instance GHC.Generics.Generic Amazonka.LexRuntime.GetSession.GetSession
instance GHC.Show.Show Amazonka.LexRuntime.GetSession.GetSession
instance GHC.Read.Read Amazonka.LexRuntime.GetSession.GetSession
instance GHC.Classes.Eq Amazonka.LexRuntime.GetSession.GetSession
instance GHC.Generics.Generic Amazonka.LexRuntime.GetSession.GetSessionResponse
instance GHC.Show.Show Amazonka.LexRuntime.GetSession.GetSessionResponse
instance GHC.Classes.Eq Amazonka.LexRuntime.GetSession.GetSessionResponse
instance Amazonka.Types.AWSRequest Amazonka.LexRuntime.GetSession.GetSession
instance Control.DeepSeq.NFData Amazonka.LexRuntime.GetSession.GetSessionResponse
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.GetSession.GetSession
instance Control.DeepSeq.NFData Amazonka.LexRuntime.GetSession.GetSession
instance Amazonka.Data.Headers.ToHeaders Amazonka.LexRuntime.GetSession.GetSession
instance Amazonka.Data.Path.ToPath Amazonka.LexRuntime.GetSession.GetSession
instance Amazonka.Data.Query.ToQuery Amazonka.LexRuntime.GetSession.GetSession
-- | Removes session information for a specified bot, alias, and user ID.
module Amazonka.LexRuntime.DeleteSession
-- | See: newDeleteSession smart constructor.
data DeleteSession
DeleteSession' :: Text -> Text -> Text -> DeleteSession
-- | The name of the bot that contains the session data.
[$sel:botName:DeleteSession'] :: DeleteSession -> Text
-- | The alias in use for the bot that contains the session data.
[$sel:botAlias:DeleteSession'] :: DeleteSession -> Text
-- | The identifier of the user associated with the session data.
[$sel:userId:DeleteSession'] :: DeleteSession -> Text
-- | Create a value of DeleteSession with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- DeleteSession, deleteSession_botName - The name of the
-- bot that contains the session data.
--
-- DeleteSession, deleteSession_botAlias - The alias in use
-- for the bot that contains the session data.
--
-- DeleteSession, deleteSession_userId - The identifier of
-- the user associated with the session data.
newDeleteSession :: Text -> Text -> Text -> DeleteSession
-- | The name of the bot that contains the session data.
deleteSession_botName :: Lens' DeleteSession Text
-- | The alias in use for the bot that contains the session data.
deleteSession_botAlias :: Lens' DeleteSession Text
-- | The identifier of the user associated with the session data.
deleteSession_userId :: Lens' DeleteSession Text
-- | See: newDeleteSessionResponse smart constructor.
data DeleteSessionResponse
DeleteSessionResponse' :: Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Int -> DeleteSessionResponse
-- | The alias in use for the bot associated with the session data.
[$sel:botAlias:DeleteSessionResponse'] :: DeleteSessionResponse -> Maybe Text
-- | The name of the bot associated with the session data.
[$sel:botName:DeleteSessionResponse'] :: DeleteSessionResponse -> Maybe Text
-- | The unique identifier for the session.
[$sel:sessionId:DeleteSessionResponse'] :: DeleteSessionResponse -> Maybe Text
-- | The ID of the client application user.
[$sel:userId:DeleteSessionResponse'] :: DeleteSessionResponse -> Maybe Text
-- | The response's http status code.
[$sel:httpStatus:DeleteSessionResponse'] :: DeleteSessionResponse -> Int
-- | Create a value of DeleteSessionResponse with all optional
-- fields omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- DeleteSession, deleteSessionResponse_botAlias - The
-- alias in use for the bot associated with the session data.
--
-- DeleteSession, deleteSessionResponse_botName - The name
-- of the bot associated with the session data.
--
-- $sel:sessionId:DeleteSessionResponse',
-- deleteSessionResponse_sessionId - The unique identifier for the
-- session.
--
-- DeleteSession, deleteSessionResponse_userId - The ID of
-- the client application user.
--
-- $sel:httpStatus:DeleteSessionResponse',
-- deleteSessionResponse_httpStatus - The response's http status
-- code.
newDeleteSessionResponse :: Int -> DeleteSessionResponse
-- | The alias in use for the bot associated with the session data.
deleteSessionResponse_botAlias :: Lens' DeleteSessionResponse (Maybe Text)
-- | The name of the bot associated with the session data.
deleteSessionResponse_botName :: Lens' DeleteSessionResponse (Maybe Text)
-- | The unique identifier for the session.
deleteSessionResponse_sessionId :: Lens' DeleteSessionResponse (Maybe Text)
-- | The ID of the client application user.
deleteSessionResponse_userId :: Lens' DeleteSessionResponse (Maybe Text)
-- | The response's http status code.
deleteSessionResponse_httpStatus :: Lens' DeleteSessionResponse Int
instance GHC.Generics.Generic Amazonka.LexRuntime.DeleteSession.DeleteSession
instance GHC.Show.Show Amazonka.LexRuntime.DeleteSession.DeleteSession
instance GHC.Read.Read Amazonka.LexRuntime.DeleteSession.DeleteSession
instance GHC.Classes.Eq Amazonka.LexRuntime.DeleteSession.DeleteSession
instance GHC.Generics.Generic Amazonka.LexRuntime.DeleteSession.DeleteSessionResponse
instance GHC.Show.Show Amazonka.LexRuntime.DeleteSession.DeleteSessionResponse
instance GHC.Read.Read Amazonka.LexRuntime.DeleteSession.DeleteSessionResponse
instance GHC.Classes.Eq Amazonka.LexRuntime.DeleteSession.DeleteSessionResponse
instance Amazonka.Types.AWSRequest Amazonka.LexRuntime.DeleteSession.DeleteSession
instance Control.DeepSeq.NFData Amazonka.LexRuntime.DeleteSession.DeleteSessionResponse
instance Data.Hashable.Class.Hashable Amazonka.LexRuntime.DeleteSession.DeleteSession
instance Control.DeepSeq.NFData Amazonka.LexRuntime.DeleteSession.DeleteSession
instance Amazonka.Data.Headers.ToHeaders Amazonka.LexRuntime.DeleteSession.DeleteSession
instance Amazonka.Data.Path.ToPath Amazonka.LexRuntime.DeleteSession.DeleteSession
instance Amazonka.Data.Query.ToQuery Amazonka.LexRuntime.DeleteSession.DeleteSession
module Amazonka.LexRuntime.Lens
-- | The name of the bot that contains the session data.
deleteSession_botName :: Lens' DeleteSession Text
-- | The alias in use for the bot that contains the session data.
deleteSession_botAlias :: Lens' DeleteSession Text
-- | The identifier of the user associated with the session data.
deleteSession_userId :: Lens' DeleteSession Text
-- | The alias in use for the bot associated with the session data.
deleteSessionResponse_botAlias :: Lens' DeleteSessionResponse (Maybe Text)
-- | The name of the bot associated with the session data.
deleteSessionResponse_botName :: Lens' DeleteSessionResponse (Maybe Text)
-- | The unique identifier for the session.
deleteSessionResponse_sessionId :: Lens' DeleteSessionResponse (Maybe Text)
-- | The ID of the client application user.
deleteSessionResponse_userId :: Lens' DeleteSessionResponse (Maybe Text)
-- | The response's http status code.
deleteSessionResponse_httpStatus :: Lens' DeleteSessionResponse Int
-- | A string used to filter the intents returned in the
-- recentIntentSummaryView structure.
--
-- When you specify a filter, only intents with their
-- checkpointLabel field set to that string are returned.
getSession_checkpointLabelFilter :: Lens' GetSession (Maybe Text)
-- | The name of the bot that contains the session data.
getSession_botName :: Lens' GetSession Text
-- | The alias in use for the bot that contains the session data.
getSession_botAlias :: Lens' GetSession Text
-- | The ID of the client application user. Amazon Lex uses this to
-- identify a user's conversation with your bot.
getSession_userId :: Lens' GetSession Text
-- | A list of active contexts for the session. A context can be set when
-- an intent is fulfilled or by calling the PostContent,
-- PostText, or PutSession operation.
--
-- You can use a context to control the intents that can follow up an
-- intent, or to modify the operation of your application.
getSessionResponse_activeContexts :: Lens' GetSessionResponse (Maybe [ActiveContext])
-- | Describes the current state of the bot.
getSessionResponse_dialogAction :: Lens' GetSessionResponse (Maybe DialogAction)
-- | An array of information about the intents used in the session. The
-- array can contain a maximum of three summaries. If more than three
-- intents are used in the session, the recentIntentSummaryView
-- operation contains information about the last three intents used.
--
-- If you set the checkpointLabelFilter parameter in the
-- request, the array contains only the intents with the specified label.
getSessionResponse_recentIntentSummaryView :: Lens' GetSessionResponse (Maybe [IntentSummary])
-- | Map of key/value pairs representing the session-specific context
-- information. It contains application information passed between Amazon
-- Lex and a client application.
getSessionResponse_sessionAttributes :: Lens' GetSessionResponse (Maybe (HashMap Text Text))
-- | A unique identifier for the session.
getSessionResponse_sessionId :: Lens' GetSessionResponse (Maybe Text)
-- | The response's http status code.
getSessionResponse_httpStatus :: Lens' GetSessionResponse Int
-- | You pass this value as the Accept HTTP header.
--
-- The message Amazon Lex returns in the response can be either text or
-- speech based on the Accept HTTP header value in the request.
--
--
-- - If the value is text/plain; charset=utf-8, Amazon Lex
-- returns text in the response.
-- - If the value begins with audio/, Amazon Lex returns
-- speech in the response. Amazon Lex uses Amazon Polly to generate the
-- speech (using the configuration you specified in the Accept
-- header). For example, if you specify audio/mpeg as the value,
-- Amazon Lex returns speech in the MPEG format.
-- - If the value is audio/pcm, the speech returned is
-- audio/pcm in 16-bit, little endian format.
-- - The following are the accepted
-- values:
- audio/mpeg
- audio/ogg
- audio/pcm
- text/plain;
-- charset=utf-8
- audio/* (defaults to mpeg)
--
postContent_accept :: Lens' PostContent (Maybe Text)
-- | A list of contexts active for the request. A context can be activated
-- when a previous intent is fulfilled, or by including the context in
-- the request,
--
-- If you don't specify a list of contexts, Amazon Lex will use the
-- current list of contexts for the session. If you specify an empty
-- list, all contexts for the session are cleared.
postContent_activeContexts :: Lens' PostContent (Maybe Text)
-- | You pass this value as the x-amz-lex-request-attributes HTTP
-- header.
--
-- Request-specific information passed between Amazon Lex and a client
-- application. The value must be a JSON serialized and base64 encoded
-- map with string keys and values. The total size of the
-- requestAttributes and sessionAttributes headers is
-- limited to 12 KB.
--
-- The namespace x-amz-lex: is reserved for special attributes.
-- Don't create any request attributes with the prefix
-- x-amz-lex:.
--
-- For more information, see Setting Request Attributes.
postContent_requestAttributes :: Lens' PostContent (Maybe Text)
-- | You pass this value as the x-amz-lex-session-attributes HTTP
-- header.
--
-- Application-specific information passed between Amazon Lex and a
-- client application. The value must be a JSON serialized and base64
-- encoded map with string keys and values. The total size of the
-- sessionAttributes and requestAttributes headers is
-- limited to 12 KB.
--
-- For more information, see Setting Session Attributes.
postContent_sessionAttributes :: Lens' PostContent (Maybe Text)
-- | Name of the Amazon Lex bot.
postContent_botName :: Lens' PostContent Text
-- | Alias of the Amazon Lex bot.
postContent_botAlias :: Lens' PostContent Text
-- | The ID of the client application user. Amazon Lex uses this to
-- identify a user's conversation with your bot. At runtime, each request
-- must contain the userID field.
--
-- To decide the user ID to use for your application, consider the
-- following factors.
--
--
-- - The userID field must not contain any personally
-- identifiable information of the user, for example, name, personal
-- identification numbers, or other end user personal information.
-- - If you want a user to start a conversation on one device and
-- continue on another device, use a user-specific identifier.
-- - If you want the same user to be able to have two independent
-- conversations on two different devices, choose a device-specific
-- identifier.
-- - A user can't have two independent conversations with two different
-- versions of the same bot. For example, a user can't have a
-- conversation with the PROD and BETA versions of the same bot. If you
-- anticipate that a user will need to have conversation with two
-- different versions, for example, while testing, include the bot alias
-- in the user ID to separate the two conversations.
--
postContent_userId :: Lens' PostContent Text
-- | You pass this value as the Content-Type HTTP header.
--
-- Indicates the audio format or text. The header value must start with
-- one of the following prefixes:
--
--
-- - PCM format, audio data must be in little-endian byte
-- order.
- audio/l16; rate=16000; channels=1
- audio/x-l16;
-- sample-rate=16000; channel-count=1
- audio/lpcm;
-- sample-rate=8000; sample-size-bits=16; channel-count=1;
-- is-big-endian=false
-- - Opus format
- audio/x-cbr-opus-with-preamble;
-- preamble-size=0; bit-rate=256000;
-- frame-size-milliseconds=4
-- - Text format
- text/plain; charset=utf-8
--
postContent_contentType :: Lens' PostContent Text
-- | User input in PCM or Opus audio format or text format as described in
-- the Content-Type HTTP header.
--
-- You can stream audio data to Amazon Lex or you can create a local
-- buffer that captures all of the audio data before sending. In general,
-- you get better performance if you stream audio data rather than
-- buffering the data locally.
postContent_inputStream :: Lens' PostContent HashedBody
-- | A list of active contexts for the session. A context can be set when
-- an intent is fulfilled or by calling the PostContent,
-- PostText, or PutSession operation.
--
-- You can use a context to control the intents that can follow up an
-- intent, or to modify the operation of your application.
postContentResponse_activeContexts :: Lens' PostContentResponse (Maybe Text)
-- | One to four alternative intents that may be applicable to the user's
-- intent.
--
-- Each alternative includes a score that indicates how confident Amazon
-- Lex is that the intent matches the user's intent. The intents are
-- sorted by the confidence score.
postContentResponse_alternativeIntents :: Lens' PostContentResponse (Maybe Text)
-- | The version of the bot that responded to the conversation. You can use
-- this information to help determine if one version of a bot is
-- performing better than another version.
postContentResponse_botVersion :: Lens' PostContentResponse (Maybe Text)
-- | Content type as specified in the Accept HTTP header in the
-- request.
postContentResponse_contentType :: Lens' PostContentResponse (Maybe Text)
-- | Identifies the current state of the user interaction. Amazon Lex
-- returns one of the following values as dialogState. The
-- client can optionally use this information to customize the user
-- interface.
--
--
-- - ElicitIntent - Amazon Lex wants to elicit the user's
-- intent. Consider the following examples:For example, a user might
-- utter an intent ("I want to order a pizza"). If Amazon Lex cannot
-- infer the user intent from this utterance, it will return this dialog
-- state.
-- - ConfirmIntent - Amazon Lex is expecting a "yes" or "no"
-- response.For example, Amazon Lex wants user confirmation before
-- fulfilling an intent. Instead of a simple "yes" or "no" response, a
-- user might respond with additional information. For example, "yes, but
-- make it a thick crust pizza" or "no, I want to order a drink." Amazon
-- Lex can process such additional information (in these examples, update
-- the crust type slot or change the intent from OrderPizza to
-- OrderDrink).
-- - ElicitSlot - Amazon Lex is expecting the value of a slot
-- for the current intent.For example, suppose that in the response
-- Amazon Lex sends this message: "What size pizza would you like?". A
-- user might reply with the slot value (e.g., "medium"). The user might
-- also provide additional information in the response (e.g., "medium
-- thick crust pizza"). Amazon Lex can process such additional
-- information appropriately.
-- - Fulfilled - Conveys that the Lambda function has
-- successfully fulfilled the intent.
-- - ReadyForFulfillment - Conveys that the client has to
-- fulfill the request.
-- - Failed - Conveys that the conversation with the user
-- failed.This can happen for various reasons, including that the user
-- does not provide an appropriate response to prompts from the service
-- (you can configure how many times Amazon Lex can prompt a user for
-- specific information), or if the Lambda function fails to fulfill the
-- intent.
--
postContentResponse_dialogState :: Lens' PostContentResponse (Maybe DialogState)
-- | The text used to process the request.
--
-- If the input was an audio stream, the encodedInputTranscript
-- field contains the text extracted from the audio stream. This is the
-- text that is actually processed to recognize intents and slot values.
-- You can use this information to determine if Amazon Lex is correctly
-- processing the audio that you send.
--
-- The encodedInputTranscript field is base-64 encoded. You must
-- decode the field before you can use the value.
postContentResponse_encodedInputTranscript :: Lens' PostContentResponse (Maybe Text)
-- | The message to convey to the user. The message can come from the bot's
-- configuration or from a Lambda function.
--
-- If the intent is not configured with a Lambda function, or if the
-- Lambda function returned Delegate as the
-- dialogAction.type in its response, Amazon Lex decides on the
-- next course of action and selects an appropriate message from the
-- bot's configuration based on the current interaction context. For
-- example, if Amazon Lex isn't able to understand user input, it uses a
-- clarification prompt message.
--
-- When you create an intent you can assign messages to groups. When
-- messages are assigned to groups Amazon Lex returns one message from
-- each group in the response. The message field is an escaped JSON
-- string containing the messages. For more information about the
-- structure of the JSON string returned, see msg-prompts-formats.
--
-- If the Lambda function returns a message, Amazon Lex passes it to the
-- client in its response.
--
-- The encodedMessage field is base-64 encoded. You must decode
-- the field before you can use the value.
postContentResponse_encodedMessage :: Lens' PostContentResponse (Maybe Text)
-- | The text used to process the request.
--
-- You can use this field only in the de-DE, en-AU, en-GB, en-US, es-419,
-- es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales,
-- the inputTranscript field is null. You should use the
-- encodedInputTranscript field instead.
--
-- If the input was an audio stream, the inputTranscript field
-- contains the text extracted from the audio stream. This is the text
-- that is actually processed to recognize intents and slot values. You
-- can use this information to determine if Amazon Lex is correctly
-- processing the audio that you send.
postContentResponse_inputTranscript :: Lens' PostContentResponse (Maybe Text)
-- | Current user intent that Amazon Lex is aware of.
postContentResponse_intentName :: Lens' PostContentResponse (Maybe Text)
-- | You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419,
-- es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales,
-- the message field is null. You should use the
-- encodedMessage field instead.
--
-- The message to convey to the user. The message can come from the bot's
-- configuration or from a Lambda function.
--
-- If the intent is not configured with a Lambda function, or if the
-- Lambda function returned Delegate as the
-- dialogAction.type in its response, Amazon Lex decides on the
-- next course of action and selects an appropriate message from the
-- bot's configuration based on the current interaction context. For
-- example, if Amazon Lex isn't able to understand user input, it uses a
-- clarification prompt message.
--
-- When you create an intent you can assign messages to groups. When
-- messages are assigned to groups Amazon Lex returns one message from
-- each group in the response. The message field is an escaped JSON
-- string containing the messages. For more information about the
-- structure of the JSON string returned, see msg-prompts-formats.
--
-- If the Lambda function returns a message, Amazon Lex passes it to the
-- client in its response.
postContentResponse_message :: Lens' PostContentResponse (Maybe Text)
-- | The format of the response message. One of the following values:
--
--
-- - 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 from the groups that messages were
-- assigned to when the intent was created.
--
postContentResponse_messageFormat :: Lens' PostContentResponse (Maybe MessageFormatType)
-- | Provides a score that indicates how confident Amazon Lex is that the
-- returned intent is the one that matches the user's intent. The score
-- is between 0.0 and 1.0.
--
-- The score is a relative score, not an absolute score. The score may
-- change based on improvements to Amazon Lex.
postContentResponse_nluIntentConfidence :: Lens' PostContentResponse (Maybe Text)
-- | The sentiment expressed in an utterance.
--
-- When the bot is configured to send utterances to Amazon Comprehend for
-- sentiment analysis, this field contains the result of the analysis.
postContentResponse_sentimentResponse :: Lens' PostContentResponse (Maybe Text)
-- | Map of key/value pairs representing the session-specific context
-- information.
postContentResponse_sessionAttributes :: Lens' PostContentResponse (Maybe Text)
-- | The unique identifier for the session.
postContentResponse_sessionId :: Lens' PostContentResponse (Maybe Text)
-- | If the dialogState value is ElicitSlot, returns the
-- name of the slot for which Amazon Lex is eliciting a value.
postContentResponse_slotToElicit :: Lens' PostContentResponse (Maybe Text)
-- | Map of zero or more intent slots (name/value pairs) Amazon Lex
-- detected from the user input during the conversation. The field is
-- base-64 encoded.
--
-- Amazon Lex creates a resolution list containing likely values for a
-- slot. The value that it returns is determined by the
-- valueSelectionStrategy selected when the slot type was
-- created or updated. If valueSelectionStrategy is set to
-- ORIGINAL_VALUE, the value provided by the user is returned,
-- if the user value is similar to the slot values. If
-- valueSelectionStrategy is set to TOP_RESOLUTION
-- Amazon Lex returns the first value in the resolution list or, if there
-- is no resolution list, null. If you don't specify a
-- valueSelectionStrategy, the default is
-- ORIGINAL_VALUE.
postContentResponse_slots :: Lens' PostContentResponse (Maybe Text)
-- | The response's http status code.
postContentResponse_httpStatus :: Lens' PostContentResponse Int
-- | The prompt (or statement) to convey to the user. This is based on the
-- bot configuration and context. For example, if Amazon Lex did not
-- understand the user intent, it sends the clarificationPrompt
-- configured for the bot. If the intent requires confirmation before
-- taking the fulfillment action, it sends the
-- confirmationPrompt. Another example: Suppose that the Lambda
-- function successfully fulfilled the intent, and sent a message to
-- convey to the user. Then Amazon Lex sends that message in the
-- response.
postContentResponse_audioStream :: Lens' PostContentResponse ResponseBody
-- | A list of contexts active for the request. A context can be activated
-- when a previous intent is fulfilled, or by including the context in
-- the request,
--
-- If you don't specify a list of contexts, Amazon Lex will use the
-- current list of contexts for the session. If you specify an empty
-- list, all contexts for the session are cleared.
postText_activeContexts :: Lens' PostText (Maybe [ActiveContext])
-- | Request-specific information passed between Amazon Lex and a client
-- application.
--
-- The namespace x-amz-lex: is reserved for special attributes.
-- Don't create any request attributes with the prefix
-- x-amz-lex:.
--
-- For more information, see Setting Request Attributes.
postText_requestAttributes :: Lens' PostText (Maybe (HashMap Text Text))
-- | Application-specific information passed between Amazon Lex and a
-- client application.
--
-- For more information, see Setting Session Attributes.
postText_sessionAttributes :: Lens' PostText (Maybe (HashMap Text Text))
-- | The name of the Amazon Lex bot.
postText_botName :: Lens' PostText Text
-- | The alias of the Amazon Lex bot.
postText_botAlias :: Lens' PostText Text
-- | The ID of the client application user. Amazon Lex uses this to
-- identify a user's conversation with your bot. At runtime, each request
-- must contain the userID field.
--
-- To decide the user ID to use for your application, consider the
-- following factors.
--
--
-- - The userID field must not contain any personally
-- identifiable information of the user, for example, name, personal
-- identification numbers, or other end user personal information.
-- - If you want a user to start a conversation on one device and
-- continue on another device, use a user-specific identifier.
-- - If you want the same user to be able to have two independent
-- conversations on two different devices, choose a device-specific
-- identifier.
-- - A user can't have two independent conversations with two different
-- versions of the same bot. For example, a user can't have a
-- conversation with the PROD and BETA versions of the same bot. If you
-- anticipate that a user will need to have conversation with two
-- different versions, for example, while testing, include the bot alias
-- in the user ID to separate the two conversations.
--
postText_userId :: Lens' PostText Text
-- | The text that the user entered (Amazon Lex interprets this text).
postText_inputText :: Lens' PostText Text
-- | A list of active contexts for the session. A context can be set when
-- an intent is fulfilled or by calling the PostContent,
-- PostText, or PutSession operation.
--
-- You can use a context to control the intents that can follow up an
-- intent, or to modify the operation of your application.
postTextResponse_activeContexts :: Lens' PostTextResponse (Maybe [ActiveContext])
-- | One to four alternative intents that may be applicable to the user's
-- intent.
--
-- Each alternative includes a score that indicates how confident Amazon
-- Lex is that the intent matches the user's intent. The intents are
-- sorted by the confidence score.
postTextResponse_alternativeIntents :: Lens' PostTextResponse (Maybe [PredictedIntent])
-- | The version of the bot that responded to the conversation. You can use
-- this information to help determine if one version of a bot is
-- performing better than another version.
postTextResponse_botVersion :: Lens' PostTextResponse (Maybe Text)
-- | Identifies the current state of the user interaction. Amazon Lex
-- returns one of the following values as dialogState. The
-- client can optionally use this information to customize the user
-- interface.
--
--
-- - ElicitIntent - Amazon Lex wants to elicit user intent.For
-- example, a user might utter an intent ("I want to order a pizza"). If
-- Amazon Lex cannot infer the user intent from this utterance, it will
-- return this dialogState.
-- - ConfirmIntent - Amazon Lex is expecting a "yes" or "no"
-- response.For example, Amazon Lex wants user confirmation before
-- fulfilling an intent.Instead of a simple "yes" or "no," a user might
-- respond with additional information. For example, "yes, but make it
-- thick crust pizza" or "no, I want to order a drink". Amazon Lex can
-- process such additional information (in these examples, update the
-- crust type slot value, or change intent from OrderPizza to
-- OrderDrink).
-- - ElicitSlot - Amazon Lex is expecting a slot value for the
-- current intent.For example, suppose that in the response Amazon Lex
-- sends this message: "What size pizza would you like?". A user might
-- reply with the slot value (e.g., "medium"). The user might also
-- provide additional information in the response (e.g., "medium thick
-- crust pizza"). Amazon Lex can process such additional information
-- appropriately.
-- - Fulfilled - Conveys that the Lambda function configured
-- for the intent has successfully fulfilled the intent.
-- - ReadyForFulfillment - Conveys that the client has to
-- fulfill the intent.
-- - Failed - Conveys that the conversation with the user
-- failed.This can happen for various reasons including that the user did
-- not provide an appropriate response to prompts from the service (you
-- can configure how many times Amazon Lex can prompt a user for specific
-- information), or the Lambda function failed to fulfill the
-- intent.
--
postTextResponse_dialogState :: Lens' PostTextResponse (Maybe DialogState)
-- | The current user intent that Amazon Lex is aware of.
postTextResponse_intentName :: Lens' PostTextResponse (Maybe Text)
-- | The message to convey to the user. The message can come from the bot's
-- configuration or from a Lambda function.
--
-- If the intent is not configured with a Lambda function, or if the
-- Lambda function returned Delegate as the
-- dialogAction.type its response, Amazon Lex decides on the
-- next course of action and selects an appropriate message from the
-- bot's configuration based on the current interaction context. For
-- example, if Amazon Lex isn't able to understand user input, it uses a
-- clarification prompt message.
--
-- When you create an intent you can assign messages to groups. When
-- messages are assigned to groups Amazon Lex returns one message from
-- each group in the response. The message field is an escaped JSON
-- string containing the messages. For more information about the
-- structure of the JSON string returned, see msg-prompts-formats.
--
-- If the Lambda function returns a message, Amazon Lex passes it to the
-- client in its response.
postTextResponse_message :: Lens' PostTextResponse (Maybe Text)
-- | The format of the response message. One of the following values:
--
--
-- - PlainText - The message contains plain UTF-8 text.
-- - CustomPayload - The message is a custom format defined by
-- the Lambda function.
-- - SSML - The message contains text formatted for voice
-- output.
-- - Composite - The message contains an escaped JSON object
-- containing one or more messages from the groups that messages were
-- assigned to when the intent was created.
--
postTextResponse_messageFormat :: Lens' PostTextResponse (Maybe MessageFormatType)
-- | Provides a score that indicates how confident Amazon Lex is that the
-- returned intent is the one that matches the user's intent. The score
-- is between 0.0 and 1.0. For more information, see Confidence
-- Scores.
--
-- The score is a relative score, not an absolute score. The score may
-- change based on improvements to Amazon Lex.
postTextResponse_nluIntentConfidence :: Lens' PostTextResponse (Maybe IntentConfidence)
-- | Represents the options that the user has to respond to the current
-- prompt. Response Card can come from the bot configuration (in the
-- Amazon Lex console, choose the settings button next to a slot) or from
-- a code hook (Lambda function).
postTextResponse_responseCard :: Lens' PostTextResponse (Maybe ResponseCard)
-- | The sentiment expressed in and utterance.
--
-- When the bot is configured to send utterances to Amazon Comprehend for
-- sentiment analysis, this field contains the result of the analysis.
postTextResponse_sentimentResponse :: Lens' PostTextResponse (Maybe SentimentResponse)
-- | A map of key-value pairs representing the session-specific context
-- information.
postTextResponse_sessionAttributes :: Lens' PostTextResponse (Maybe (HashMap Text Text))
-- | A unique identifier for the session.
postTextResponse_sessionId :: Lens' PostTextResponse (Maybe Text)
-- | If the dialogState value is ElicitSlot, returns the
-- name of the slot for which Amazon Lex is eliciting a value.
postTextResponse_slotToElicit :: Lens' PostTextResponse (Maybe Text)
-- | The intent slots that Amazon Lex detected from the user input in the
-- conversation.
--
-- Amazon Lex creates a resolution list containing likely values for a
-- slot. The value that it returns is determined by the
-- valueSelectionStrategy selected when the slot type was
-- created or updated. If valueSelectionStrategy is set to
-- ORIGINAL_VALUE, the value provided by the user is returned,
-- if the user value is similar to the slot values. If
-- valueSelectionStrategy is set to TOP_RESOLUTION
-- Amazon Lex returns the first value in the resolution list or, if there
-- is no resolution list, null. If you don't specify a
-- valueSelectionStrategy, the default is
-- ORIGINAL_VALUE.
postTextResponse_slots :: Lens' PostTextResponse (Maybe (HashMap Text Text))
-- | The response's http status code.
postTextResponse_httpStatus :: Lens' PostTextResponse Int
-- | The message that Amazon Lex returns in the response can be either text
-- or speech based depending on the value of this field.
--
--
-- - If the value is text/plain; charset=utf-8, Amazon Lex
-- returns text in the response.
-- - If the value begins with audio/, Amazon Lex returns
-- speech in the response. Amazon Lex uses Amazon Polly to generate the
-- speech in the configuration that you specify. For example, if you
-- specify audio/mpeg as the value, Amazon Lex returns speech in
-- the MPEG format.
-- - If the value is audio/pcm, the speech is returned as
-- audio/pcm in 16-bit, little endian format.
-- - The following are the accepted
-- values:
--
putSession_accept :: Lens' PutSession (Maybe Text)
-- | A list of contexts active for the request. A context can be activated
-- when a previous intent is fulfilled, or by including the context in
-- the request,
--
-- If you don't specify a list of contexts, Amazon Lex will use the
-- current list of contexts for the session. If you specify an empty
-- list, all contexts for the session are cleared.
putSession_activeContexts :: Lens' PutSession (Maybe [ActiveContext])
-- | Sets the next action that the bot should take to fulfill the
-- conversation.
putSession_dialogAction :: Lens' PutSession (Maybe DialogAction)
-- | A summary of the recent intents for the bot. You can use the intent
-- summary view to set a checkpoint label on an intent and modify
-- attributes of intents. You can also use it to remove or add intent
-- summary objects to the list.
--
-- An intent that you modify or add to the list must make sense for the
-- bot. For example, the intent name must be valid for the bot. You must
-- provide valid values for:
--
--
-- intentName
-- - slot names
-- slotToElict
--
--
-- If you send the recentIntentSummaryView parameter in a
-- PutSession request, the contents of the new summary view
-- replaces the old summary view. For example, if a GetSession
-- request returns three intents in the summary view and you call
-- PutSession with one intent in the summary view, the next call
-- to GetSession will only return one intent.
putSession_recentIntentSummaryView :: Lens' PutSession (Maybe [IntentSummary])
-- | Map of key/value pairs representing the session-specific context
-- information. It contains application information passed between Amazon
-- Lex and a client application.
putSession_sessionAttributes :: Lens' PutSession (Maybe (HashMap Text Text))
-- | The name of the bot that contains the session data.
putSession_botName :: Lens' PutSession Text
-- | The alias in use for the bot that contains the session data.
putSession_botAlias :: Lens' PutSession Text
-- | The ID of the client application user. Amazon Lex uses this to
-- identify a user's conversation with your bot.
putSession_userId :: Lens' PutSession Text
-- | A list of active contexts for the session.
putSessionResponse_activeContexts :: Lens' PutSessionResponse (Maybe Text)
-- | Content type as specified in the Accept HTTP header in the
-- request.
putSessionResponse_contentType :: Lens' PutSessionResponse (Maybe Text)
-- |
-- - ConfirmIntent - Amazon Lex is expecting a "yes" or "no"
-- response to confirm the intent before fulfilling an intent.
-- - ElicitIntent - Amazon Lex wants to elicit the user's
-- intent.
-- - ElicitSlot - Amazon Lex is expecting the value of a slot
-- for the current intent.
-- - Failed - Conveys that the conversation with the user has
-- failed. This can happen for various reasons, including the user does
-- not provide an appropriate response to prompts from the service, or if
-- the Lambda function fails to fulfill the intent.
-- - Fulfilled - Conveys that the Lambda function has
-- sucessfully fulfilled the intent.
-- - ReadyForFulfillment - Conveys that the client has to
-- fulfill the intent.
--
putSessionResponse_dialogState :: Lens' PutSessionResponse (Maybe DialogState)
-- | The next message that should be presented to the user.
--
-- The encodedMessage field is base-64 encoded. You must decode
-- the field before you can use the value.
putSessionResponse_encodedMessage :: Lens' PutSessionResponse (Maybe Text)
-- | The name of the current intent.
putSessionResponse_intentName :: Lens' PutSessionResponse (Maybe Text)
-- | The next message that should be presented to the user.
--
-- You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419,
-- es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales,
-- the message field is null. You should use the
-- encodedMessage field instead.
putSessionResponse_message :: Lens' PutSessionResponse (Maybe Text)
-- | The format of the response message. One of the following values:
--
--
-- - 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 from the groups that messages were
-- assigned to when the intent was created.
--
putSessionResponse_messageFormat :: Lens' PutSessionResponse (Maybe MessageFormatType)
-- | Map of key/value pairs representing session-specific context
-- information.
putSessionResponse_sessionAttributes :: Lens' PutSessionResponse (Maybe Text)
-- | A unique identifier for the session.
putSessionResponse_sessionId :: Lens' PutSessionResponse (Maybe Text)
-- | If the dialogState is ElicitSlot, returns the name
-- of the slot for which Amazon Lex is eliciting a value.
putSessionResponse_slotToElicit :: Lens' PutSessionResponse (Maybe Text)
-- | Map of zero or more intent slots Amazon Lex detected from the user
-- input during the conversation.
--
-- Amazon Lex creates a resolution list containing likely values for a
-- slot. The value that it returns is determined by the
-- valueSelectionStrategy selected when the slot type was
-- created or updated. If valueSelectionStrategy is set to
-- ORIGINAL_VALUE, the value provided by the user is returned,
-- if the user value is similar to the slot values. If
-- valueSelectionStrategy is set to TOP_RESOLUTION
-- Amazon Lex returns the first value in the resolution list or, if there
-- is no resolution list, null. If you don't specify a
-- valueSelectionStrategy the default is
-- ORIGINAL_VALUE.
putSessionResponse_slots :: Lens' PutSessionResponse (Maybe Text)
-- | The response's http status code.
putSessionResponse_httpStatus :: Lens' PutSessionResponse Int
-- | The audio version of the message to convey to the user.
putSessionResponse_audioStream :: Lens' PutSessionResponse ResponseBody
-- | The name of the context.
activeContext_name :: Lens' ActiveContext Text
-- | The length of time or number of turns that a context remains active.
activeContext_timeToLive :: Lens' ActiveContext ActiveContextTimeToLive
-- | State variables for the current context. You can use these values as
-- default values for slots in subsequent events.
activeContext_parameters :: Lens' ActiveContext (HashMap Text Text)
-- | The number of seconds that the context should be active after it is
-- first sent in a PostContent or PostText response.
-- You can set the value between 5 and 86,400 seconds (24 hours).
activeContextTimeToLive_timeToLiveInSeconds :: Lens' ActiveContextTimeToLive (Maybe Natural)
-- | The number of conversation turns that the context should be active. A
-- conversation turn is one PostContent or PostText
-- request and the corresponding response from Amazon Lex.
activeContextTimeToLive_turnsToLive :: Lens' ActiveContextTimeToLive (Maybe Natural)
-- | Text that is visible to the user on the button.
button_text :: Lens' Button Text
-- | The value sent to Amazon Lex when a user chooses the button. For
-- example, consider button text "NYC." When the user chooses the button,
-- the value sent can be "New York City."
button_value :: Lens' Button Text
-- | 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' DialogAction (Maybe FulfillmentState)
-- | The name of the intent.
dialogAction_intentName :: Lens' DialogAction (Maybe 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_message :: Lens' DialogAction (Maybe 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 Message
-- Groups.
--
dialogAction_messageFormat :: Lens' DialogAction (Maybe MessageFormatType)
-- | The name of the slot that should be elicited from the user.
dialogAction_slotToElicit :: Lens' DialogAction (Maybe Text)
-- | Map of the slots that have been gathered and their values.
dialogAction_slots :: Lens' DialogAction (Maybe (HashMap Text 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_type :: Lens' DialogAction DialogActionType
-- | The URL of an attachment to the response card.
genericAttachment_attachmentLinkUrl :: Lens' GenericAttachment (Maybe Text)
-- | The list of options to show to the user.
genericAttachment_buttons :: Lens' GenericAttachment (Maybe [Button])
-- | The URL of an image that is displayed to the user.
genericAttachment_imageUrl :: Lens' GenericAttachment (Maybe Text)
-- | The subtitle shown below the title.
genericAttachment_subTitle :: Lens' GenericAttachment (Maybe Text)
-- | The title of the option.
genericAttachment_title :: Lens' GenericAttachment (Maybe Text)
-- | A score that indicates how confident Amazon Lex is that an intent
-- satisfies the user's intent. Ranges between 0.00 and 1.00. Higher
-- scores indicate higher confidence.
intentConfidence_score :: Lens' IntentConfidence (Maybe Double)
-- | A user-defined label that identifies a particular intent. You can use
-- this label to return to a previous intent.
--
-- Use the checkpointLabelFilter parameter of the
-- GetSessionRequest operation to filter the intents returned by
-- the operation to those with only the specified label.
intentSummary_checkpointLabel :: Lens' IntentSummary (Maybe Text)
-- | The status of the intent after the user responds to the confirmation
-- prompt. If the user confirms the intent, Amazon Lex sets this field to
-- Confirmed. If the user denies the intent, Amazon Lex sets
-- this value to Denied. The possible values are:
--
--
-- - Confirmed - The user has responded "Yes" to the
-- confirmation prompt, confirming that the intent is complete and that
-- it is ready to be fulfilled.
-- - Denied - The user has responded "No" to the confirmation
-- prompt.
-- - None - The user has never been prompted for confirmation;
-- or, the user was prompted but did not confirm or deny the prompt.
--
intentSummary_confirmationStatus :: Lens' IntentSummary (Maybe ConfirmationStatus)
-- | 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.
--
intentSummary_fulfillmentState :: Lens' IntentSummary (Maybe FulfillmentState)
-- | The name of the intent.
intentSummary_intentName :: Lens' IntentSummary (Maybe Text)
-- | The next slot to elicit from the user. If there is not slot to elicit,
-- the field is blank.
intentSummary_slotToElicit :: Lens' IntentSummary (Maybe Text)
-- | Map of the slots that have been gathered and their values.
intentSummary_slots :: Lens' IntentSummary (Maybe (HashMap Text 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.
-- - 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.
--
intentSummary_dialogActionType :: Lens' IntentSummary DialogActionType
-- | The name of the intent that Amazon Lex suggests satisfies the user's
-- intent.
predictedIntent_intentName :: Lens' PredictedIntent (Maybe Text)
-- | Indicates how confident Amazon Lex is that an intent satisfies the
-- user's intent.
predictedIntent_nluIntentConfidence :: Lens' PredictedIntent (Maybe IntentConfidence)
-- | The slot and slot values associated with the predicted intent.
predictedIntent_slots :: Lens' PredictedIntent (Maybe (HashMap Text Text))
-- | The content type of the response.
responseCard_contentType :: Lens' ResponseCard (Maybe ContentType)
-- | An array of attachment objects representing options.
responseCard_genericAttachments :: Lens' ResponseCard (Maybe [GenericAttachment])
-- | The version of the response card format.
responseCard_version :: Lens' ResponseCard (Maybe Text)
-- | The inferred sentiment that Amazon Comprehend has the highest
-- confidence in.
sentimentResponse_sentimentLabel :: Lens' SentimentResponse (Maybe Text)
-- | The likelihood that the sentiment was correctly inferred.
sentimentResponse_sentimentScore :: Lens' SentimentResponse (Maybe Text)
module Amazonka.LexRuntime.Waiters
-- | Derived from API version 2016-11-28 of the AWS service
-- descriptions, licensed under Apache 2.0.
--
-- Amazon Lex provides both build and runtime endpoints. Each endpoint
-- provides a set of operations (API). Your conversational bot uses the
-- runtime API to understand user utterances (user input text or voice).
-- For example, suppose a user says "I want pizza", your bot sends this
-- input to Amazon Lex using the runtime API. Amazon Lex recognizes that
-- the user request is for the OrderPizza intent (one of the intents
-- defined in the bot). Then Amazon Lex engages in user conversation on
-- behalf of the bot to elicit required information (slot values, such as
-- pizza size and crust type), and then performs fulfillment activity
-- (that you configured when you created the bot). You use the build-time
-- API to create and manage your Amazon Lex bot. For a list of build-time
-- operations, see the build-time API, .
module Amazonka.LexRuntime
-- | API version 2016-11-28 of the Amazon Lex Runtime Service SDK
-- configuration.
defaultService :: Service
-- | Either the Amazon Lex bot is still building, or one of the dependent
-- services (Amazon Polly, AWS Lambda) failed with an internal service
-- error.
_BadGatewayException :: AsError a => Fold a ServiceError
-- | Request validation failed, there is no usable message in the context,
-- or the bot build failed, is still in progress, or contains unbuilt
-- changes.
_BadRequestException :: AsError a => Fold a ServiceError
-- | Two clients are using the same AWS account, Amazon Lex bot, and user
-- ID.
_ConflictException :: AsError a => Fold a ServiceError
-- | One of the dependencies, such as AWS Lambda or Amazon Polly, threw an
-- exception. For example,
--
--
-- - If Amazon Lex does not have sufficient permissions to call a
-- Lambda function.
-- - If a Lambda function takes longer than 30 seconds to execute.
-- - If a fulfillment Lambda function returns a Delegate
-- dialog action without removing any slot values.
--
_DependencyFailedException :: AsError a => Fold a ServiceError
-- | Internal service error. Retry the call.
_InternalFailureException :: AsError a => Fold a ServiceError
-- | Exceeded a limit.
_LimitExceededException :: AsError a => Fold a ServiceError
-- | This exception is not used.
_LoopDetectedException :: AsError a => Fold a ServiceError
-- | The accept header in the request does not have a valid value.
_NotAcceptableException :: AsError a => Fold a ServiceError
-- | The resource (such as the Amazon Lex bot or an alias) that is referred
-- to is not found.
_NotFoundException :: AsError a => Fold a ServiceError
-- | The input speech is too long.
_RequestTimeoutException :: AsError a => Fold a ServiceError
-- | The Content-Type header (PostContent API) has an invalid
-- value.
_UnsupportedMediaTypeException :: AsError a => Fold a ServiceError
-- | See: newDeleteSession smart constructor.
data DeleteSession
DeleteSession' :: Text -> Text -> Text -> DeleteSession
-- | Create a value of DeleteSession with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- DeleteSession, deleteSession_botName - The name of the
-- bot that contains the session data.
--
-- DeleteSession, deleteSession_botAlias - The alias in use
-- for the bot that contains the session data.
--
-- DeleteSession, deleteSession_userId - The identifier of
-- the user associated with the session data.
newDeleteSession :: Text -> Text -> Text -> DeleteSession
-- | See: newDeleteSessionResponse smart constructor.
data DeleteSessionResponse
DeleteSessionResponse' :: Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Int -> DeleteSessionResponse
-- | Create a value of DeleteSessionResponse with all optional
-- fields omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- DeleteSession, deleteSessionResponse_botAlias - The
-- alias in use for the bot associated with the session data.
--
-- DeleteSession, deleteSessionResponse_botName - The name
-- of the bot associated with the session data.
--
-- $sel:sessionId:DeleteSessionResponse',
-- deleteSessionResponse_sessionId - The unique identifier for the
-- session.
--
-- DeleteSession, deleteSessionResponse_userId - The ID of
-- the client application user.
--
-- $sel:httpStatus:DeleteSessionResponse',
-- deleteSessionResponse_httpStatus - The response's http status
-- code.
newDeleteSessionResponse :: Int -> DeleteSessionResponse
-- | See: newGetSession smart constructor.
data GetSession
GetSession' :: Maybe Text -> Text -> Text -> Text -> GetSession
-- | Create a value of GetSession with all optional fields omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:checkpointLabelFilter:GetSession',
-- getSession_checkpointLabelFilter - A string used to filter the
-- intents returned in the recentIntentSummaryView structure.
--
-- When you specify a filter, only intents with their
-- checkpointLabel field set to that string are returned.
--
-- $sel:botName:GetSession', getSession_botName - The name
-- of the bot that contains the session data.
--
-- $sel:botAlias:GetSession', getSession_botAlias - The
-- alias in use for the bot that contains the session data.
--
-- $sel:userId:GetSession', getSession_userId - The ID of
-- the client application user. Amazon Lex uses this to identify a user's
-- conversation with your bot.
newGetSession :: Text -> Text -> Text -> GetSession
-- | See: newGetSessionResponse smart constructor.
data GetSessionResponse
GetSessionResponse' :: Maybe (Sensitive [ActiveContext]) -> Maybe DialogAction -> Maybe [IntentSummary] -> Maybe (Sensitive (HashMap Text Text)) -> Maybe Text -> Int -> GetSessionResponse
-- | Create a value of GetSessionResponse with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:activeContexts:GetSessionResponse',
-- getSessionResponse_activeContexts - A list of active contexts
-- for the session. A context can be set when an intent is fulfilled or
-- by calling the PostContent, PostText, or
-- PutSession operation.
--
-- You can use a context to control the intents that can follow up an
-- intent, or to modify the operation of your application.
--
-- $sel:dialogAction:GetSessionResponse',
-- getSessionResponse_dialogAction - Describes the current state
-- of the bot.
--
-- $sel:recentIntentSummaryView:GetSessionResponse',
-- getSessionResponse_recentIntentSummaryView - An array of
-- information about the intents used in the session. The array can
-- contain a maximum of three summaries. If more than three intents are
-- used in the session, the recentIntentSummaryView operation
-- contains information about the last three intents used.
--
-- If you set the checkpointLabelFilter parameter in the
-- request, the array contains only the intents with the specified label.
--
-- $sel:sessionAttributes:GetSessionResponse',
-- getSessionResponse_sessionAttributes - Map of key/value pairs
-- representing the session-specific context information. It contains
-- application information passed between Amazon Lex and a client
-- application.
--
-- $sel:sessionId:GetSessionResponse',
-- getSessionResponse_sessionId - A unique identifier for the
-- session.
--
-- $sel:httpStatus:GetSessionResponse',
-- getSessionResponse_httpStatus - The response's http status
-- code.
newGetSessionResponse :: Int -> GetSessionResponse
-- | See: newPostContent smart constructor.
data PostContent
PostContent' :: Maybe Text -> Maybe (Sensitive Text) -> Maybe (Sensitive Text) -> Maybe (Sensitive Text) -> Text -> Text -> Text -> Text -> HashedBody -> PostContent
-- | Create a value of PostContent with all optional fields omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:accept:PostContent', postContent_accept - You pass
-- this value as the Accept HTTP header.
--
-- The message Amazon Lex returns in the response can be either text or
-- speech based on the Accept HTTP header value in the request.
--
--
-- - If the value is text/plain; charset=utf-8, Amazon Lex
-- returns text in the response.
-- - If the value begins with audio/, Amazon Lex returns
-- speech in the response. Amazon Lex uses Amazon Polly to generate the
-- speech (using the configuration you specified in the Accept
-- header). For example, if you specify audio/mpeg as the value,
-- Amazon Lex returns speech in the MPEG format.
-- - If the value is audio/pcm, the speech returned is
-- audio/pcm in 16-bit, little endian format.
-- - The following are the accepted
-- values:
- audio/mpeg
- audio/ogg
- audio/pcm
- text/plain;
-- charset=utf-8
- audio/* (defaults to mpeg)
--
--
-- PostContent, postContent_activeContexts - A list of
-- contexts active for the request. A context can be activated when a
-- previous intent is fulfilled, or by including the context in the
-- request,
--
-- If you don't specify a list of contexts, Amazon Lex will use the
-- current list of contexts for the session. If you specify an empty
-- list, all contexts for the session are cleared.
--
-- $sel:requestAttributes:PostContent',
-- postContent_requestAttributes - You pass this value as the
-- x-amz-lex-request-attributes HTTP header.
--
-- Request-specific information passed between Amazon Lex and a client
-- application. The value must be a JSON serialized and base64 encoded
-- map with string keys and values. The total size of the
-- requestAttributes and sessionAttributes headers is
-- limited to 12 KB.
--
-- The namespace x-amz-lex: is reserved for special attributes.
-- Don't create any request attributes with the prefix
-- x-amz-lex:.
--
-- For more information, see Setting Request Attributes.
--
-- PostContent, postContent_sessionAttributes - You pass
-- this value as the x-amz-lex-session-attributes HTTP header.
--
-- Application-specific information passed between Amazon Lex and a
-- client application. The value must be a JSON serialized and base64
-- encoded map with string keys and values. The total size of the
-- sessionAttributes and requestAttributes headers is
-- limited to 12 KB.
--
-- For more information, see Setting Session Attributes.
--
-- $sel:botName:PostContent', postContent_botName - Name of
-- the Amazon Lex bot.
--
-- $sel:botAlias:PostContent', postContent_botAlias - Alias
-- of the Amazon Lex bot.
--
-- $sel:userId:PostContent', postContent_userId - The ID of
-- the client application user. Amazon Lex uses this to identify a user's
-- conversation with your bot. At runtime, each request must contain the
-- userID field.
--
-- To decide the user ID to use for your application, consider the
-- following factors.
--
--
-- - The userID field must not contain any personally
-- identifiable information of the user, for example, name, personal
-- identification numbers, or other end user personal information.
-- - If you want a user to start a conversation on one device and
-- continue on another device, use a user-specific identifier.
-- - If you want the same user to be able to have two independent
-- conversations on two different devices, choose a device-specific
-- identifier.
-- - A user can't have two independent conversations with two different
-- versions of the same bot. For example, a user can't have a
-- conversation with the PROD and BETA versions of the same bot. If you
-- anticipate that a user will need to have conversation with two
-- different versions, for example, while testing, include the bot alias
-- in the user ID to separate the two conversations.
--
--
-- PostContent, postContent_contentType - You pass this
-- value as the Content-Type HTTP header.
--
-- Indicates the audio format or text. The header value must start with
-- one of the following prefixes:
--
--
-- - PCM format, audio data must be in little-endian byte
-- order.
- audio/l16; rate=16000; channels=1
- audio/x-l16;
-- sample-rate=16000; channel-count=1
- audio/lpcm;
-- sample-rate=8000; sample-size-bits=16; channel-count=1;
-- is-big-endian=false
-- - Opus format
- audio/x-cbr-opus-with-preamble;
-- preamble-size=0; bit-rate=256000;
-- frame-size-milliseconds=4
-- - Text format
- text/plain; charset=utf-8
--
--
-- $sel:inputStream:PostContent', postContent_inputStream -
-- User input in PCM or Opus audio format or text format as described in
-- the Content-Type HTTP header.
--
-- You can stream audio data to Amazon Lex or you can create a local
-- buffer that captures all of the audio data before sending. In general,
-- you get better performance if you stream audio data rather than
-- buffering the data locally.
newPostContent :: Text -> Text -> Text -> Text -> HashedBody -> PostContent
-- | See: newPostContentResponse smart constructor.
data PostContentResponse
PostContentResponse' :: Maybe (Sensitive Text) -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe DialogState -> Maybe (Sensitive Text) -> Maybe (Sensitive Text) -> Maybe Text -> Maybe Text -> Maybe (Sensitive Text) -> Maybe MessageFormatType -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Int -> ResponseBody -> PostContentResponse
-- | Create a value of PostContentResponse with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- PostContent, postContentResponse_activeContexts - A list
-- of active contexts for the session. A context can be set when an
-- intent is fulfilled or by calling the PostContent,
-- PostText, or PutSession operation.
--
-- You can use a context to control the intents that can follow up an
-- intent, or to modify the operation of your application.
--
-- $sel:alternativeIntents:PostContentResponse',
-- postContentResponse_alternativeIntents - One to four
-- alternative intents that may be applicable to the user's intent.
--
-- Each alternative includes a score that indicates how confident Amazon
-- Lex is that the intent matches the user's intent. The intents are
-- sorted by the confidence score.
--
-- $sel:botVersion:PostContentResponse',
-- postContentResponse_botVersion - The version of the bot that
-- responded to the conversation. You can use this information to help
-- determine if one version of a bot is performing better than another
-- version.
--
-- PostContent, postContentResponse_contentType - Content
-- type as specified in the Accept HTTP header in the request.
--
-- $sel:dialogState:PostContentResponse',
-- postContentResponse_dialogState - Identifies the current state
-- of the user interaction. Amazon Lex returns one of the following
-- values as dialogState. The client can optionally use this
-- information to customize the user interface.
--
--
-- - ElicitIntent - Amazon Lex wants to elicit the user's
-- intent. Consider the following examples:For example, a user might
-- utter an intent ("I want to order a pizza"). If Amazon Lex cannot
-- infer the user intent from this utterance, it will return this dialog
-- state.
-- - ConfirmIntent - Amazon Lex is expecting a "yes" or "no"
-- response.For example, Amazon Lex wants user confirmation before
-- fulfilling an intent. Instead of a simple "yes" or "no" response, a
-- user might respond with additional information. For example, "yes, but
-- make it a thick crust pizza" or "no, I want to order a drink." Amazon
-- Lex can process such additional information (in these examples, update
-- the crust type slot or change the intent from OrderPizza to
-- OrderDrink).
-- - ElicitSlot - Amazon Lex is expecting the value of a slot
-- for the current intent.For example, suppose that in the response
-- Amazon Lex sends this message: "What size pizza would you like?". A
-- user might reply with the slot value (e.g., "medium"). The user might
-- also provide additional information in the response (e.g., "medium
-- thick crust pizza"). Amazon Lex can process such additional
-- information appropriately.
-- - Fulfilled - Conveys that the Lambda function has
-- successfully fulfilled the intent.
-- - ReadyForFulfillment - Conveys that the client has to
-- fulfill the request.
-- - Failed - Conveys that the conversation with the user
-- failed.This can happen for various reasons, including that the user
-- does not provide an appropriate response to prompts from the service
-- (you can configure how many times Amazon Lex can prompt a user for
-- specific information), or if the Lambda function fails to fulfill the
-- intent.
--
--
-- $sel:encodedInputTranscript:PostContentResponse',
-- postContentResponse_encodedInputTranscript - The text used to
-- process the request.
--
-- If the input was an audio stream, the encodedInputTranscript
-- field contains the text extracted from the audio stream. This is the
-- text that is actually processed to recognize intents and slot values.
-- You can use this information to determine if Amazon Lex is correctly
-- processing the audio that you send.
--
-- The encodedInputTranscript field is base-64 encoded. You must
-- decode the field before you can use the value.
--
-- $sel:encodedMessage:PostContentResponse',
-- postContentResponse_encodedMessage - The message to convey to
-- the user. The message can come from the bot's configuration or from a
-- Lambda function.
--
-- If the intent is not configured with a Lambda function, or if the
-- Lambda function returned Delegate as the
-- dialogAction.type in its response, Amazon Lex decides on the
-- next course of action and selects an appropriate message from the
-- bot's configuration based on the current interaction context. For
-- example, if Amazon Lex isn't able to understand user input, it uses a
-- clarification prompt message.
--
-- When you create an intent you can assign messages to groups. When
-- messages are assigned to groups Amazon Lex returns one message from
-- each group in the response. The message field is an escaped JSON
-- string containing the messages. For more information about the
-- structure of the JSON string returned, see msg-prompts-formats.
--
-- If the Lambda function returns a message, Amazon Lex passes it to the
-- client in its response.
--
-- The encodedMessage field is base-64 encoded. You must decode
-- the field before you can use the value.
--
-- $sel:inputTranscript:PostContentResponse',
-- postContentResponse_inputTranscript - The text used to process
-- the request.
--
-- You can use this field only in the de-DE, en-AU, en-GB, en-US, es-419,
-- es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales,
-- the inputTranscript field is null. You should use the
-- encodedInputTranscript field instead.
--
-- If the input was an audio stream, the inputTranscript field
-- contains the text extracted from the audio stream. This is the text
-- that is actually processed to recognize intents and slot values. You
-- can use this information to determine if Amazon Lex is correctly
-- processing the audio that you send.
--
-- PostContentResponse, postContentResponse_intentName -
-- Current user intent that Amazon Lex is aware of.
--
-- PostContentResponse, postContentResponse_message - You
-- can only use this field in the de-DE, en-AU, en-GB, en-US, es-419,
-- es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales,
-- the message field is null. You should use the
-- encodedMessage field instead.
--
-- The message to convey to the user. The message can come from the bot's
-- configuration or from a Lambda function.
--
-- If the intent is not configured with a Lambda function, or if the
-- Lambda function returned Delegate as the
-- dialogAction.type in its response, Amazon Lex decides on the
-- next course of action and selects an appropriate message from the
-- bot's configuration based on the current interaction context. For
-- example, if Amazon Lex isn't able to understand user input, it uses a
-- clarification prompt message.
--
-- When you create an intent you can assign messages to groups. When
-- messages are assigned to groups Amazon Lex returns one message from
-- each group in the response. The message field is an escaped JSON
-- string containing the messages. For more information about the
-- structure of the JSON string returned, see msg-prompts-formats.
--
-- If the Lambda function returns a message, Amazon Lex passes it to the
-- client in its response.
--
-- PostContentResponse, postContentResponse_messageFormat -
-- The format of the response message. One of the following values:
--
--
-- - 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 from the groups that messages were
-- assigned to when the intent was created.
--
--
-- PostContentResponse,
-- postContentResponse_nluIntentConfidence - Provides a score that
-- indicates how confident Amazon Lex is that the returned intent is the
-- one that matches the user's intent. The score is between 0.0 and 1.0.
--
-- The score is a relative score, not an absolute score. The score may
-- change based on improvements to Amazon Lex.
--
-- $sel:sentimentResponse:PostContentResponse',
-- postContentResponse_sentimentResponse - The sentiment expressed
-- in an utterance.
--
-- When the bot is configured to send utterances to Amazon Comprehend for
-- sentiment analysis, this field contains the result of the analysis.
--
-- PostContent, postContentResponse_sessionAttributes - Map
-- of key/value pairs representing the session-specific context
-- information.
--
-- $sel:sessionId:PostContentResponse',
-- postContentResponse_sessionId - The unique identifier for the
-- session.
--
-- PostContentResponse, postContentResponse_slotToElicit -
-- If the dialogState value is ElicitSlot, returns the
-- name of the slot for which Amazon Lex is eliciting a value.
--
-- PostContentResponse, postContentResponse_slots - Map of
-- zero or more intent slots (name/value pairs) Amazon Lex detected from
-- the user input during the conversation. The field is base-64 encoded.
--
-- Amazon Lex creates a resolution list containing likely values for a
-- slot. The value that it returns is determined by the
-- valueSelectionStrategy selected when the slot type was
-- created or updated. If valueSelectionStrategy is set to
-- ORIGINAL_VALUE, the value provided by the user is returned,
-- if the user value is similar to the slot values. If
-- valueSelectionStrategy is set to TOP_RESOLUTION
-- Amazon Lex returns the first value in the resolution list or, if there
-- is no resolution list, null. If you don't specify a
-- valueSelectionStrategy, the default is
-- ORIGINAL_VALUE.
--
-- $sel:httpStatus:PostContentResponse',
-- postContentResponse_httpStatus - The response's http status
-- code.
--
-- $sel:audioStream:PostContentResponse',
-- postContentResponse_audioStream - The prompt (or statement) to
-- convey to the user. This is based on the bot configuration and
-- context. For example, if Amazon Lex did not understand the user
-- intent, it sends the clarificationPrompt configured for the
-- bot. If the intent requires confirmation before taking the fulfillment
-- action, it sends the confirmationPrompt. Another example:
-- Suppose that the Lambda function successfully fulfilled the intent,
-- and sent a message to convey to the user. Then Amazon Lex sends that
-- message in the response.
newPostContentResponse :: Int -> ResponseBody -> PostContentResponse
-- | See: newPostText smart constructor.
data PostText
PostText' :: Maybe (Sensitive [ActiveContext]) -> Maybe (Sensitive (HashMap Text Text)) -> Maybe (Sensitive (HashMap Text Text)) -> Text -> Text -> Text -> Sensitive Text -> PostText
-- | Create a value of PostText with all optional fields omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- PostText, postText_activeContexts - A list of contexts
-- active for the request. A context can be activated when a previous
-- intent is fulfilled, or by including the context in the request,
--
-- If you don't specify a list of contexts, Amazon Lex will use the
-- current list of contexts for the session. If you specify an empty
-- list, all contexts for the session are cleared.
--
-- $sel:requestAttributes:PostText',
-- postText_requestAttributes - Request-specific information
-- passed between Amazon Lex and a client application.
--
-- The namespace x-amz-lex: is reserved for special attributes.
-- Don't create any request attributes with the prefix
-- x-amz-lex:.
--
-- For more information, see Setting Request Attributes.
--
-- PostText, postText_sessionAttributes -
-- Application-specific information passed between Amazon Lex and a
-- client application.
--
-- For more information, see Setting Session Attributes.
--
-- $sel:botName:PostText', postText_botName - The name of
-- the Amazon Lex bot.
--
-- $sel:botAlias:PostText', postText_botAlias - The alias
-- of the Amazon Lex bot.
--
-- $sel:userId:PostText', postText_userId - The ID of the
-- client application user. Amazon Lex uses this to identify a user's
-- conversation with your bot. At runtime, each request must contain the
-- userID field.
--
-- To decide the user ID to use for your application, consider the
-- following factors.
--
--
-- - The userID field must not contain any personally
-- identifiable information of the user, for example, name, personal
-- identification numbers, or other end user personal information.
-- - If you want a user to start a conversation on one device and
-- continue on another device, use a user-specific identifier.
-- - If you want the same user to be able to have two independent
-- conversations on two different devices, choose a device-specific
-- identifier.
-- - A user can't have two independent conversations with two different
-- versions of the same bot. For example, a user can't have a
-- conversation with the PROD and BETA versions of the same bot. If you
-- anticipate that a user will need to have conversation with two
-- different versions, for example, while testing, include the bot alias
-- in the user ID to separate the two conversations.
--
--
-- $sel:inputText:PostText', postText_inputText - The text
-- that the user entered (Amazon Lex interprets this text).
newPostText :: Text -> Text -> Text -> Text -> PostText
-- | See: newPostTextResponse smart constructor.
data PostTextResponse
PostTextResponse' :: Maybe (Sensitive [ActiveContext]) -> Maybe [PredictedIntent] -> Maybe Text -> Maybe DialogState -> Maybe Text -> Maybe (Sensitive Text) -> Maybe MessageFormatType -> Maybe IntentConfidence -> Maybe ResponseCard -> Maybe SentimentResponse -> Maybe (Sensitive (HashMap Text Text)) -> Maybe Text -> Maybe Text -> Maybe (Sensitive (HashMap Text Text)) -> Int -> PostTextResponse
-- | Create a value of PostTextResponse with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- PostText, postTextResponse_activeContexts - A list of
-- active contexts for the session. A context can be set when an intent
-- is fulfilled or by calling the PostContent,
-- PostText, or PutSession operation.
--
-- You can use a context to control the intents that can follow up an
-- intent, or to modify the operation of your application.
--
-- $sel:alternativeIntents:PostTextResponse',
-- postTextResponse_alternativeIntents - One to four alternative
-- intents that may be applicable to the user's intent.
--
-- Each alternative includes a score that indicates how confident Amazon
-- Lex is that the intent matches the user's intent. The intents are
-- sorted by the confidence score.
--
-- $sel:botVersion:PostTextResponse',
-- postTextResponse_botVersion - The version of the bot that
-- responded to the conversation. You can use this information to help
-- determine if one version of a bot is performing better than another
-- version.
--
-- $sel:dialogState:PostTextResponse',
-- postTextResponse_dialogState - Identifies the current state of
-- the user interaction. Amazon Lex returns one of the following values
-- as dialogState. The client can optionally use this
-- information to customize the user interface.
--
--
-- - ElicitIntent - Amazon Lex wants to elicit user intent.For
-- example, a user might utter an intent ("I want to order a pizza"). If
-- Amazon Lex cannot infer the user intent from this utterance, it will
-- return this dialogState.
-- - ConfirmIntent - Amazon Lex is expecting a "yes" or "no"
-- response.For example, Amazon Lex wants user confirmation before
-- fulfilling an intent.Instead of a simple "yes" or "no," a user might
-- respond with additional information. For example, "yes, but make it
-- thick crust pizza" or "no, I want to order a drink". Amazon Lex can
-- process such additional information (in these examples, update the
-- crust type slot value, or change intent from OrderPizza to
-- OrderDrink).
-- - ElicitSlot - Amazon Lex is expecting a slot value for the
-- current intent.For example, suppose that in the response Amazon Lex
-- sends this message: "What size pizza would you like?". A user might
-- reply with the slot value (e.g., "medium"). The user might also
-- provide additional information in the response (e.g., "medium thick
-- crust pizza"). Amazon Lex can process such additional information
-- appropriately.
-- - Fulfilled - Conveys that the Lambda function configured
-- for the intent has successfully fulfilled the intent.
-- - ReadyForFulfillment - Conveys that the client has to
-- fulfill the intent.
-- - Failed - Conveys that the conversation with the user
-- failed.This can happen for various reasons including that the user did
-- not provide an appropriate response to prompts from the service (you
-- can configure how many times Amazon Lex can prompt a user for specific
-- information), or the Lambda function failed to fulfill the
-- intent.
--
--
-- PostTextResponse, postTextResponse_intentName - The
-- current user intent that Amazon Lex is aware of.
--
-- PostTextResponse, postTextResponse_message - The message
-- to convey to the user. The message can come from the bot's
-- configuration or from a Lambda function.
--
-- If the intent is not configured with a Lambda function, or if the
-- Lambda function returned Delegate as the
-- dialogAction.type its response, Amazon Lex decides on the
-- next course of action and selects an appropriate message from the
-- bot's configuration based on the current interaction context. For
-- example, if Amazon Lex isn't able to understand user input, it uses a
-- clarification prompt message.
--
-- When you create an intent you can assign messages to groups. When
-- messages are assigned to groups Amazon Lex returns one message from
-- each group in the response. The message field is an escaped JSON
-- string containing the messages. For more information about the
-- structure of the JSON string returned, see msg-prompts-formats.
--
-- If the Lambda function returns a message, Amazon Lex passes it to the
-- client in its response.
--
-- PostTextResponse, postTextResponse_messageFormat - The
-- format of the response message. One of the following values:
--
--
-- - PlainText - The message contains plain UTF-8 text.
-- - CustomPayload - The message is a custom format defined by
-- the Lambda function.
-- - SSML - The message contains text formatted for voice
-- output.
-- - Composite - The message contains an escaped JSON object
-- containing one or more messages from the groups that messages were
-- assigned to when the intent was created.
--
--
-- PostTextResponse, postTextResponse_nluIntentConfidence -
-- Provides a score that indicates how confident Amazon Lex is that the
-- returned intent is the one that matches the user's intent. The score
-- is between 0.0 and 1.0. For more information, see Confidence
-- Scores.
--
-- The score is a relative score, not an absolute score. The score may
-- change based on improvements to Amazon Lex.
--
-- $sel:responseCard:PostTextResponse',
-- postTextResponse_responseCard - Represents the options that the
-- user has to respond to the current prompt. Response Card can come from
-- the bot configuration (in the Amazon Lex console, choose the settings
-- button next to a slot) or from a code hook (Lambda function).
--
-- $sel:sentimentResponse:PostTextResponse',
-- postTextResponse_sentimentResponse - The sentiment expressed in
-- and utterance.
--
-- When the bot is configured to send utterances to Amazon Comprehend for
-- sentiment analysis, this field contains the result of the analysis.
--
-- PostText, postTextResponse_sessionAttributes - A map of
-- key-value pairs representing the session-specific context information.
--
-- $sel:sessionId:PostTextResponse',
-- postTextResponse_sessionId - A unique identifier for the
-- session.
--
-- PostTextResponse, postTextResponse_slotToElicit - If the
-- dialogState value is ElicitSlot, returns the name of
-- the slot for which Amazon Lex is eliciting a value.
--
-- PostTextResponse, postTextResponse_slots - The intent
-- slots that Amazon Lex detected from the user input in the
-- conversation.
--
-- Amazon Lex creates a resolution list containing likely values for a
-- slot. The value that it returns is determined by the
-- valueSelectionStrategy selected when the slot type was
-- created or updated. If valueSelectionStrategy is set to
-- ORIGINAL_VALUE, the value provided by the user is returned,
-- if the user value is similar to the slot values. If
-- valueSelectionStrategy is set to TOP_RESOLUTION
-- Amazon Lex returns the first value in the resolution list or, if there
-- is no resolution list, null. If you don't specify a
-- valueSelectionStrategy, the default is
-- ORIGINAL_VALUE.
--
-- $sel:httpStatus:PostTextResponse',
-- postTextResponse_httpStatus - The response's http status code.
newPostTextResponse :: Int -> PostTextResponse
-- | See: newPutSession smart constructor.
data PutSession
PutSession' :: Maybe Text -> Maybe (Sensitive [ActiveContext]) -> Maybe DialogAction -> Maybe [IntentSummary] -> Maybe (Sensitive (HashMap Text Text)) -> Text -> Text -> Text -> PutSession
-- | Create a value of PutSession with all optional fields omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:accept:PutSession', putSession_accept - The message
-- that Amazon Lex returns in the response can be either text or speech
-- based depending on the value of this field.
--
--
-- - If the value is text/plain; charset=utf-8, Amazon Lex
-- returns text in the response.
-- - If the value begins with audio/, Amazon Lex returns
-- speech in the response. Amazon Lex uses Amazon Polly to generate the
-- speech in the configuration that you specify. For example, if you
-- specify audio/mpeg as the value, Amazon Lex returns speech in
-- the MPEG format.
-- - If the value is audio/pcm, the speech is returned as
-- audio/pcm in 16-bit, little endian format.
-- - The following are the accepted
-- values:
--
--
-- PutSession, putSession_activeContexts - A list of
-- contexts active for the request. A context can be activated when a
-- previous intent is fulfilled, or by including the context in the
-- request,
--
-- If you don't specify a list of contexts, Amazon Lex will use the
-- current list of contexts for the session. If you specify an empty
-- list, all contexts for the session are cleared.
--
-- $sel:dialogAction:PutSession', putSession_dialogAction -
-- Sets the next action that the bot should take to fulfill the
-- conversation.
--
-- $sel:recentIntentSummaryView:PutSession',
-- putSession_recentIntentSummaryView - A summary of the recent
-- intents for the bot. You can use the intent summary view to set a
-- checkpoint label on an intent and modify attributes of intents. You
-- can also use it to remove or add intent summary objects to the list.
--
-- An intent that you modify or add to the list must make sense for the
-- bot. For example, the intent name must be valid for the bot. You must
-- provide valid values for:
--
--
-- intentName
-- - slot names
-- slotToElict
--
--
-- If you send the recentIntentSummaryView parameter in a
-- PutSession request, the contents of the new summary view
-- replaces the old summary view. For example, if a GetSession
-- request returns three intents in the summary view and you call
-- PutSession with one intent in the summary view, the next call
-- to GetSession will only return one intent.
--
-- PutSession, putSession_sessionAttributes - Map of
-- key/value pairs representing the session-specific context information.
-- It contains application information passed between Amazon Lex and a
-- client application.
--
-- $sel:botName:PutSession', putSession_botName - The name
-- of the bot that contains the session data.
--
-- $sel:botAlias:PutSession', putSession_botAlias - The
-- alias in use for the bot that contains the session data.
--
-- $sel:userId:PutSession', putSession_userId - The ID of
-- the client application user. Amazon Lex uses this to identify a user's
-- conversation with your bot.
newPutSession :: Text -> Text -> Text -> PutSession
-- | See: newPutSessionResponse smart constructor.
data PutSessionResponse
PutSessionResponse' :: Maybe (Sensitive Text) -> Maybe Text -> Maybe DialogState -> Maybe (Sensitive Text) -> Maybe Text -> Maybe (Sensitive Text) -> Maybe MessageFormatType -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Int -> ResponseBody -> PutSessionResponse
-- | Create a value of PutSessionResponse with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- PutSession, putSessionResponse_activeContexts - A list
-- of active contexts for the session.
--
-- PutSessionResponse, putSessionResponse_contentType -
-- Content type as specified in the Accept HTTP header in the
-- request.
--
-- $sel:dialogState:PutSessionResponse',
-- putSessionResponse_dialogState - - ConfirmIntent -
-- Amazon Lex is expecting a "yes" or "no" response to confirm the intent
-- before fulfilling an intent.
--
--
-- - ElicitIntent - Amazon Lex wants to elicit the user's
-- intent.
-- - ElicitSlot - Amazon Lex is expecting the value of a slot
-- for the current intent.
-- - Failed - Conveys that the conversation with the user has
-- failed. This can happen for various reasons, including the user does
-- not provide an appropriate response to prompts from the service, or if
-- the Lambda function fails to fulfill the intent.
-- - Fulfilled - Conveys that the Lambda function has
-- sucessfully fulfilled the intent.
-- - ReadyForFulfillment - Conveys that the client has to
-- fulfill the intent.
--
--
-- $sel:encodedMessage:PutSessionResponse',
-- putSessionResponse_encodedMessage - The next message that
-- should be presented to the user.
--
-- The encodedMessage field is base-64 encoded. You must decode
-- the field before you can use the value.
--
-- PutSessionResponse, putSessionResponse_intentName - The
-- name of the current intent.
--
-- PutSessionResponse, putSessionResponse_message - The
-- next message that should be presented to the user.
--
-- You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419,
-- es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales,
-- the message field is null. You should use the
-- encodedMessage field instead.
--
-- PutSessionResponse, putSessionResponse_messageFormat -
-- The format of the response message. One of the following values:
--
--
-- - 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 from the groups that messages were
-- assigned to when the intent was created.
--
--
-- PutSession, putSessionResponse_sessionAttributes - Map
-- of key/value pairs representing session-specific context information.
--
-- $sel:sessionId:PutSessionResponse',
-- putSessionResponse_sessionId - A unique identifier for the
-- session.
--
-- PutSessionResponse, putSessionResponse_slotToElicit - If
-- the dialogState is ElicitSlot, returns the name of
-- the slot for which Amazon Lex is eliciting a value.
--
-- PutSessionResponse, putSessionResponse_slots - Map of
-- zero or more intent slots Amazon Lex detected from the user input
-- during the conversation.
--
-- Amazon Lex creates a resolution list containing likely values for a
-- slot. The value that it returns is determined by the
-- valueSelectionStrategy selected when the slot type was
-- created or updated. If valueSelectionStrategy is set to
-- ORIGINAL_VALUE, the value provided by the user is returned,
-- if the user value is similar to the slot values. If
-- valueSelectionStrategy is set to TOP_RESOLUTION
-- Amazon Lex returns the first value in the resolution list or, if there
-- is no resolution list, null. If you don't specify a
-- valueSelectionStrategy the default is
-- ORIGINAL_VALUE.
--
-- $sel:httpStatus:PutSessionResponse',
-- putSessionResponse_httpStatus - The response's http status
-- code.
--
-- $sel:audioStream:PutSessionResponse',
-- putSessionResponse_audioStream - The audio version of the
-- message to convey to the user.
newPutSessionResponse :: Int -> ResponseBody -> PutSessionResponse
newtype ConfirmationStatus
ConfirmationStatus' :: Text -> ConfirmationStatus
[fromConfirmationStatus] :: ConfirmationStatus -> Text
pattern ConfirmationStatus_Confirmed :: ConfirmationStatus
pattern ConfirmationStatus_Denied :: ConfirmationStatus
pattern ConfirmationStatus_None :: ConfirmationStatus
newtype ContentType
ContentType' :: Text -> ContentType
[fromContentType] :: ContentType -> Text
pattern ContentType_Application_vnd_amazonaws_card_generic :: ContentType
newtype DialogActionType
DialogActionType' :: Text -> DialogActionType
[fromDialogActionType] :: DialogActionType -> Text
pattern DialogActionType_Close :: DialogActionType
pattern DialogActionType_ConfirmIntent :: DialogActionType
pattern DialogActionType_Delegate :: DialogActionType
pattern DialogActionType_ElicitIntent :: DialogActionType
pattern DialogActionType_ElicitSlot :: DialogActionType
newtype DialogState
DialogState' :: Text -> DialogState
[fromDialogState] :: DialogState -> Text
pattern DialogState_ConfirmIntent :: DialogState
pattern DialogState_ElicitIntent :: DialogState
pattern DialogState_ElicitSlot :: DialogState
pattern DialogState_Failed :: DialogState
pattern DialogState_Fulfilled :: DialogState
pattern DialogState_ReadyForFulfillment :: DialogState
newtype FulfillmentState
FulfillmentState' :: Text -> FulfillmentState
[fromFulfillmentState] :: FulfillmentState -> Text
pattern FulfillmentState_Failed :: FulfillmentState
pattern FulfillmentState_Fulfilled :: FulfillmentState
pattern FulfillmentState_ReadyForFulfillment :: FulfillmentState
newtype MessageFormatType
MessageFormatType' :: Text -> MessageFormatType
[fromMessageFormatType] :: MessageFormatType -> Text
pattern MessageFormatType_Composite :: MessageFormatType
pattern MessageFormatType_CustomPayload :: MessageFormatType
pattern MessageFormatType_PlainText :: MessageFormatType
pattern MessageFormatType_SSML :: MessageFormatType
-- | A context is a variable that contains information about the current
-- state of the conversation between a user and Amazon Lex. Context can
-- be set automatically by Amazon Lex when an intent is fulfilled, or it
-- can be set at runtime using the PutContent, PutText,
-- or PutSession operation.
--
-- See: newActiveContext smart constructor.
data ActiveContext
ActiveContext' :: Text -> ActiveContextTimeToLive -> HashMap Text (Sensitive Text) -> ActiveContext
-- | Create a value of ActiveContext with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:name:ActiveContext', activeContext_name - The name
-- of the context.
--
-- $sel:timeToLive:ActiveContext', activeContext_timeToLive
-- - The length of time or number of turns that a context remains active.
--
-- $sel:parameters:ActiveContext', activeContext_parameters
-- - State variables for the current context. You can use these values as
-- default values for slots in subsequent events.
newActiveContext :: Text -> ActiveContextTimeToLive -> ActiveContext
-- | The length of time or number of turns that a context remains active.
--
-- See: newActiveContextTimeToLive smart constructor.
data ActiveContextTimeToLive
ActiveContextTimeToLive' :: Maybe Natural -> Maybe Natural -> ActiveContextTimeToLive
-- | Create a value of ActiveContextTimeToLive with all optional
-- fields omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:timeToLiveInSeconds:ActiveContextTimeToLive',
-- activeContextTimeToLive_timeToLiveInSeconds - The number of
-- seconds that the context should be active after it is first sent in a
-- PostContent or PostText response. You can set the
-- value between 5 and 86,400 seconds (24 hours).
--
-- $sel:turnsToLive:ActiveContextTimeToLive',
-- activeContextTimeToLive_turnsToLive - The number of
-- conversation turns that the context should be active. A conversation
-- turn is one PostContent or PostText request and the
-- corresponding response from Amazon Lex.
newActiveContextTimeToLive :: ActiveContextTimeToLive
-- | Represents an option to be shown on the client platform (Facebook,
-- Slack, etc.)
--
-- See: newButton smart constructor.
data Button
Button' :: Text -> Text -> Button
-- | Create a value of Button with all optional fields omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:text:Button', button_text - Text that is visible to
-- the user on the button.
--
-- $sel:value:Button', button_value - The value sent to
-- Amazon Lex when a user chooses the button. For example, consider
-- button text "NYC." When the user chooses the button, the value sent
-- can be "New York City."
newButton :: Text -> Text -> Button
-- | 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' :: Maybe FulfillmentState -> Maybe Text -> Maybe (Sensitive Text) -> Maybe MessageFormatType -> Maybe Text -> Maybe (Sensitive (HashMap Text Text)) -> DialogActionType -> DialogAction
-- | Create a value of DialogAction with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:fulfillmentState:DialogAction',
-- 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.
--
--
-- $sel:intentName:DialogAction', dialogAction_intentName -
-- The name of the intent.
--
-- $sel:message:DialogAction', 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.
--
-- $sel:messageFormat:DialogAction',
-- 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 Message
-- Groups.
--
--
-- $sel:slotToElicit:DialogAction',
-- dialogAction_slotToElicit - The name of the slot that should be
-- elicited from the user.
--
-- $sel:slots:DialogAction', dialogAction_slots - Map of
-- the slots that have been gathered and their values.
--
-- $sel:type':DialogAction', 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 :: DialogActionType -> DialogAction
-- | Represents an option rendered to the user when a prompt is shown. It
-- could be an image, a button, a link, or text.
--
-- See: newGenericAttachment smart constructor.
data GenericAttachment
GenericAttachment' :: Maybe Text -> Maybe [Button] -> Maybe Text -> Maybe Text -> Maybe Text -> GenericAttachment
-- | Create a value of GenericAttachment with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:attachmentLinkUrl:GenericAttachment',
-- genericAttachment_attachmentLinkUrl - The URL of an attachment
-- to the response card.
--
-- $sel:buttons:GenericAttachment',
-- genericAttachment_buttons - The list of options to show to the
-- user.
--
-- $sel:imageUrl:GenericAttachment',
-- genericAttachment_imageUrl - The URL of an image that is
-- displayed to the user.
--
-- $sel:subTitle:GenericAttachment',
-- genericAttachment_subTitle - The subtitle shown below the
-- title.
--
-- $sel:title:GenericAttachment', genericAttachment_title -
-- The title of the option.
newGenericAttachment :: GenericAttachment
-- | Provides a score that indicates the confidence that Amazon Lex has
-- that an intent is the one that satisfies the user's intent.
--
-- See: newIntentConfidence smart constructor.
data IntentConfidence
IntentConfidence' :: Maybe Double -> IntentConfidence
-- | Create a value of IntentConfidence with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:score:IntentConfidence', intentConfidence_score - A
-- score that indicates how confident Amazon Lex is that an intent
-- satisfies the user's intent. Ranges between 0.00 and 1.00. Higher
-- scores indicate higher confidence.
newIntentConfidence :: IntentConfidence
-- | Provides information about the state of an intent. You can use this
-- information to get the current state of an intent so that you can
-- process the intent, or so that you can return the intent to its
-- previous state.
--
-- See: newIntentSummary smart constructor.
data IntentSummary
IntentSummary' :: Maybe Text -> Maybe ConfirmationStatus -> Maybe FulfillmentState -> Maybe Text -> Maybe Text -> Maybe (Sensitive (HashMap Text Text)) -> DialogActionType -> IntentSummary
-- | Create a value of IntentSummary with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:checkpointLabel:IntentSummary',
-- intentSummary_checkpointLabel - A user-defined label that
-- identifies a particular intent. You can use this label to return to a
-- previous intent.
--
-- Use the checkpointLabelFilter parameter of the
-- GetSessionRequest operation to filter the intents returned by
-- the operation to those with only the specified label.
--
-- $sel:confirmationStatus:IntentSummary',
-- intentSummary_confirmationStatus - The status of the intent
-- after the user responds to the confirmation prompt. If the user
-- confirms the intent, Amazon Lex sets this field to Confirmed.
-- If the user denies the intent, Amazon Lex sets this value to
-- Denied. The possible values are:
--
--
-- - Confirmed - The user has responded "Yes" to the
-- confirmation prompt, confirming that the intent is complete and that
-- it is ready to be fulfilled.
-- - Denied - The user has responded "No" to the confirmation
-- prompt.
-- - None - The user has never been prompted for confirmation;
-- or, the user was prompted but did not confirm or deny the prompt.
--
--
-- $sel:fulfillmentState:IntentSummary',
-- intentSummary_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.
--
--
-- $sel:intentName:IntentSummary', intentSummary_intentName
-- - The name of the intent.
--
-- $sel:slotToElicit:IntentSummary',
-- intentSummary_slotToElicit - The next slot to elicit from the
-- user. If there is not slot to elicit, the field is blank.
--
-- $sel:slots:IntentSummary', intentSummary_slots - Map of
-- the slots that have been gathered and their values.
--
-- $sel:dialogActionType:IntentSummary',
-- intentSummary_dialogActionType - 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.
-- - 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.
--
newIntentSummary :: DialogActionType -> IntentSummary
-- | An intent that Amazon Lex suggests satisfies the user's intent.
-- Includes the name of the intent, the confidence that Amazon Lex has
-- that the user's intent is satisfied, and the slots defined for the
-- intent.
--
-- See: newPredictedIntent smart constructor.
data PredictedIntent
PredictedIntent' :: Maybe Text -> Maybe IntentConfidence -> Maybe (Sensitive (HashMap Text Text)) -> PredictedIntent
-- | Create a value of PredictedIntent with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:intentName:PredictedIntent',
-- predictedIntent_intentName - The name of the intent that Amazon
-- Lex suggests satisfies the user's intent.
--
-- $sel:nluIntentConfidence:PredictedIntent',
-- predictedIntent_nluIntentConfidence - Indicates how confident
-- Amazon Lex is that an intent satisfies the user's intent.
--
-- $sel:slots:PredictedIntent', predictedIntent_slots - The
-- slot and slot values associated with the predicted intent.
newPredictedIntent :: PredictedIntent
-- | If you configure a response card when creating your bots, Amazon Lex
-- substitutes the session attributes and slot values that are available,
-- and then returns it. The response card can also come from a Lambda
-- function ( dialogCodeHook and fulfillmentActivity on
-- an intent).
--
-- See: newResponseCard smart constructor.
data ResponseCard
ResponseCard' :: Maybe ContentType -> Maybe [GenericAttachment] -> Maybe Text -> ResponseCard
-- | Create a value of ResponseCard with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:contentType:ResponseCard', responseCard_contentType
-- - The content type of the response.
--
-- $sel:genericAttachments:ResponseCard',
-- responseCard_genericAttachments - An array of attachment
-- objects representing options.
--
-- $sel:version:ResponseCard', responseCard_version - The
-- version of the response card format.
newResponseCard :: ResponseCard
-- | The sentiment expressed in an utterance.
--
-- When the bot is configured to send utterances to Amazon Comprehend for
-- sentiment analysis, this field structure contains the result of the
-- analysis.
--
-- See: newSentimentResponse smart constructor.
data SentimentResponse
SentimentResponse' :: Maybe Text -> Maybe Text -> SentimentResponse
-- | Create a value of SentimentResponse with all optional fields
-- omitted.
--
-- Use generic-lens or optics to modify other optional
-- fields.
--
-- The following record fields are available, with the corresponding
-- lenses provided for backwards compatibility:
--
-- $sel:sentimentLabel:SentimentResponse',
-- sentimentResponse_sentimentLabel - The inferred sentiment that
-- Amazon Comprehend has the highest confidence in.
--
-- $sel:sentimentScore:SentimentResponse',
-- sentimentResponse_sentimentScore - The likelihood that the
-- sentiment was correctly inferred.
newSentimentResponse :: SentimentResponse