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

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

-- |
-- Module      : Amazonka.LexModels.PutIntent
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates an intent or replaces an existing intent.
--
-- To define the interaction between the user and your bot, you use one or
-- more intents. For a pizza ordering bot, for example, you would create an
-- @OrderPizza@ intent.
--
-- To create an intent or replace an existing intent, you must provide the
-- following:
--
-- -   Intent name. For example, @OrderPizza@.
--
-- -   Sample utterances. For example, \"Can I order a pizza, please.\" and
--     \"I want to order a pizza.\"
--
-- -   Information to be gathered. You specify slot types for the
--     information that your bot will request from the user. You can
--     specify standard slot types, such as a date or a time, or custom
--     slot types such as the size and crust of a pizza.
--
-- -   How the intent will be fulfilled. You can provide a Lambda function
--     or configure the intent to return the intent information to the
--     client application. If you use a Lambda function, when all of the
--     intent information is available, Amazon Lex invokes your Lambda
--     function. If you configure your intent to return the intent
--     information to the client application.
--
-- You can specify other optional information in the request, such as:
--
-- -   A confirmation prompt to ask the user to confirm an intent. For
--     example, \"Shall I order your pizza?\"
--
-- -   A conclusion statement to send to the user after the intent has been
--     fulfilled. For example, \"I placed your pizza order.\"
--
-- -   A follow-up prompt that asks the user for additional activity. For
--     example, asking \"Do you want to order a drink with your pizza?\"
--
-- If you specify an existing intent name to update the intent, Amazon Lex
-- replaces the values in the @$LATEST@ version of the intent with the
-- values in the request. Amazon Lex removes fields that you don\'t provide
-- in the request. If you don\'t specify the required fields, Amazon Lex
-- throws an exception. When you update the @$LATEST@ version of an intent,
-- the @status@ field of any bot that uses the @$LATEST@ version of the
-- intent is set to @NOT_BUILT@.
--
-- For more information, see how-it-works.
--
-- This operation requires permissions for the @lex:PutIntent@ action.
module Amazonka.LexModels.PutIntent
  ( -- * Creating a Request
    PutIntent (..),
    newPutIntent,

    -- * Request Lenses
    putIntent_checksum,
    putIntent_conclusionStatement,
    putIntent_confirmationPrompt,
    putIntent_createVersion,
    putIntent_description,
    putIntent_dialogCodeHook,
    putIntent_followUpPrompt,
    putIntent_fulfillmentActivity,
    putIntent_inputContexts,
    putIntent_kendraConfiguration,
    putIntent_outputContexts,
    putIntent_parentIntentSignature,
    putIntent_rejectionStatement,
    putIntent_sampleUtterances,
    putIntent_slots,
    putIntent_name,

    -- * Destructuring the Response
    PutIntentResponse (..),
    newPutIntentResponse,

    -- * Response Lenses
    putIntentResponse_checksum,
    putIntentResponse_conclusionStatement,
    putIntentResponse_confirmationPrompt,
    putIntentResponse_createVersion,
    putIntentResponse_createdDate,
    putIntentResponse_description,
    putIntentResponse_dialogCodeHook,
    putIntentResponse_followUpPrompt,
    putIntentResponse_fulfillmentActivity,
    putIntentResponse_inputContexts,
    putIntentResponse_kendraConfiguration,
    putIntentResponse_lastUpdatedDate,
    putIntentResponse_name,
    putIntentResponse_outputContexts,
    putIntentResponse_parentIntentSignature,
    putIntentResponse_rejectionStatement,
    putIntentResponse_sampleUtterances,
    putIntentResponse_slots,
    putIntentResponse_version,
    putIntentResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.LexModels.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newPutIntent' smart constructor.
data PutIntent = PutIntent'
  { -- | Identifies a specific revision of the @$LATEST@ version.
    --
    -- When you create a new intent, leave the @checksum@ field blank. If you
    -- specify a checksum you get a @BadRequestException@ exception.
    --
    -- When you want to update a intent, set the @checksum@ field to the
    -- checksum of the most recent revision of the @$LATEST@ version. If you
    -- don\'t specify the @ checksum@ field, or if the checksum does not match
    -- the @$LATEST@ version, you get a @PreconditionFailedException@
    -- exception.
    PutIntent -> Maybe Text
checksum :: Prelude.Maybe Prelude.Text,
    -- | The statement that you want Amazon Lex to convey to the user after the
    -- intent is successfully fulfilled by the Lambda function.
    --
    -- This element is relevant only if you provide a Lambda function in the
    -- @fulfillmentActivity@. If you return the intent to the client
    -- application, you can\'t specify this element.
    --
    -- The @followUpPrompt@ and @conclusionStatement@ are mutually exclusive.
    -- You can specify only one.
    PutIntent -> Maybe Statement
conclusionStatement :: Prelude.Maybe Statement,
    -- | Prompts the user to confirm the intent. This question should have a yes
    -- or no answer.
    --
    -- Amazon Lex uses this prompt to ensure that the user acknowledges that
    -- the intent is ready for fulfillment. For example, with the @OrderPizza@
    -- intent, you might want to confirm that the order is correct before
    -- placing it. For other intents, such as intents that simply respond to
    -- user questions, you might not need to ask the user for confirmation
    -- before providing the information.
    --
    -- You you must provide both the @rejectionStatement@ and the
    -- @confirmationPrompt@, or neither.
    PutIntent -> Maybe Prompt
confirmationPrompt :: Prelude.Maybe Prompt,
    -- | When set to @true@ a new numbered version of the intent is created. This
    -- is the same as calling the @CreateIntentVersion@ operation. If you do
    -- not specify @createVersion@, the default is @false@.
    PutIntent -> Maybe Bool
createVersion :: Prelude.Maybe Prelude.Bool,
    -- | A description of the intent.
    PutIntent -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Specifies a Lambda function to invoke for each user input. You can
    -- invoke this Lambda function to personalize user interaction.
    --
    -- For example, suppose your bot determines that the user is John. Your
    -- Lambda function might retrieve John\'s information from a backend
    -- database and prepopulate some of the values. For example, if you find
    -- that John is gluten intolerant, you might set the corresponding intent
    -- slot, @GlutenIntolerant@, to true. You might find John\'s phone number
    -- and set the corresponding session attribute.
    PutIntent -> Maybe CodeHook
dialogCodeHook :: Prelude.Maybe CodeHook,
    -- | Amazon Lex uses this prompt to solicit additional activity after
    -- fulfilling an intent. For example, after the @OrderPizza@ intent is
    -- fulfilled, you might prompt the user to order a drink.
    --
    -- The action that Amazon Lex takes depends on the user\'s response, as
    -- follows:
    --
    -- -   If the user says \"Yes\" it responds with the clarification prompt
    --     that is configured for the bot.
    --
    -- -   if the user says \"Yes\" and continues with an utterance that
    --     triggers an intent it starts a conversation for the intent.
    --
    -- -   If the user says \"No\" it responds with the rejection statement
    --     configured for the the follow-up prompt.
    --
    -- -   If it doesn\'t recognize the utterance it repeats the follow-up
    --     prompt again.
    --
    -- The @followUpPrompt@ field and the @conclusionStatement@ field are
    -- mutually exclusive. You can specify only one.
    PutIntent -> Maybe FollowUpPrompt
followUpPrompt :: Prelude.Maybe FollowUpPrompt,
    -- | Required. Describes how the intent is fulfilled. For example, after a
    -- user provides all of the information for a pizza order,
    -- @fulfillmentActivity@ defines how the bot places an order with a local
    -- pizza store.
    --
    -- You might configure Amazon Lex to return all of the intent information
    -- to the client application, or direct it to invoke a Lambda function that
    -- can process the intent (for example, place an order with a pizzeria).
    PutIntent -> Maybe FulfillmentActivity
fulfillmentActivity :: Prelude.Maybe FulfillmentActivity,
    -- | An array of @InputContext@ objects that lists the contexts that must be
    -- active for Amazon Lex to choose the intent in a conversation with the
    -- user.
    PutIntent -> Maybe [InputContext]
inputContexts :: Prelude.Maybe [InputContext],
    -- | Configuration information required to use the
    -- @AMAZON.KendraSearchIntent@ intent to connect to an Amazon Kendra index.
    -- For more information, see
    -- <http://docs.aws.amazon.com/lex/latest/dg/built-in-intent-kendra-search.html AMAZON.KendraSearchIntent>.
    PutIntent -> Maybe KendraConfiguration
kendraConfiguration :: Prelude.Maybe KendraConfiguration,
    -- | An array of @OutputContext@ objects that lists the contexts that the
    -- intent activates when the intent is fulfilled.
    PutIntent -> Maybe [OutputContext]
outputContexts :: Prelude.Maybe [OutputContext],
    -- | A unique identifier for the built-in intent to base this intent on. To
    -- find the signature for an intent, see
    -- <https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents Standard Built-in Intents>
    -- in the /Alexa Skills Kit/.
    PutIntent -> Maybe Text
parentIntentSignature :: Prelude.Maybe Prelude.Text,
    -- | When the user answers \"no\" to the question defined in
    -- @confirmationPrompt@, Amazon Lex responds with this statement to
    -- acknowledge that the intent was canceled.
    --
    -- You must provide both the @rejectionStatement@ and the
    -- @confirmationPrompt@, or neither.
    PutIntent -> Maybe Statement
rejectionStatement :: Prelude.Maybe Statement,
    -- | An array of utterances (strings) that a user might say to signal the
    -- intent. For example, \"I want {PizzaSize} pizza\", \"Order {Quantity}
    -- {PizzaSize} pizzas\".
    --
    -- In each utterance, a slot name is enclosed in curly braces.
    PutIntent -> Maybe [Text]
sampleUtterances :: Prelude.Maybe [Prelude.Text],
    -- | An array of intent slots. At runtime, Amazon Lex elicits required slot
    -- values from the user using prompts defined in the slots. For more
    -- information, see how-it-works.
    PutIntent -> Maybe [Slot]
slots :: Prelude.Maybe [Slot],
    -- | The name of the intent. The name is /not/ case sensitive.
    --
    -- The name can\'t match a built-in intent name, or a built-in intent name
    -- with \"AMAZON.\" removed. For example, because there is a built-in
    -- intent called @AMAZON.HelpIntent@, you can\'t create a custom intent
    -- called @HelpIntent@.
    --
    -- For a list of built-in intents, see
    -- <https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents Standard Built-in Intents>
    -- in the /Alexa Skills Kit/.
    PutIntent -> Text
name :: Prelude.Text
  }
  deriving (PutIntent -> PutIntent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutIntent -> PutIntent -> Bool
$c/= :: PutIntent -> PutIntent -> Bool
== :: PutIntent -> PutIntent -> Bool
$c== :: PutIntent -> PutIntent -> Bool
Prelude.Eq, ReadPrec [PutIntent]
ReadPrec PutIntent
Int -> ReadS PutIntent
ReadS [PutIntent]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutIntent]
$creadListPrec :: ReadPrec [PutIntent]
readPrec :: ReadPrec PutIntent
$creadPrec :: ReadPrec PutIntent
readList :: ReadS [PutIntent]
$creadList :: ReadS [PutIntent]
readsPrec :: Int -> ReadS PutIntent
$creadsPrec :: Int -> ReadS PutIntent
Prelude.Read, Int -> PutIntent -> ShowS
[PutIntent] -> ShowS
PutIntent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutIntent] -> ShowS
$cshowList :: [PutIntent] -> ShowS
show :: PutIntent -> String
$cshow :: PutIntent -> String
showsPrec :: Int -> PutIntent -> ShowS
$cshowsPrec :: Int -> PutIntent -> ShowS
Prelude.Show, forall x. Rep PutIntent x -> PutIntent
forall x. PutIntent -> Rep PutIntent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutIntent x -> PutIntent
$cfrom :: forall x. PutIntent -> Rep PutIntent x
Prelude.Generic)

-- |
-- Create a value of 'PutIntent' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'checksum', 'putIntent_checksum' - Identifies a specific revision of the @$LATEST@ version.
--
-- When you create a new intent, leave the @checksum@ field blank. If you
-- specify a checksum you get a @BadRequestException@ exception.
--
-- When you want to update a intent, set the @checksum@ field to the
-- checksum of the most recent revision of the @$LATEST@ version. If you
-- don\'t specify the @ checksum@ field, or if the checksum does not match
-- the @$LATEST@ version, you get a @PreconditionFailedException@
-- exception.
--
-- 'conclusionStatement', 'putIntent_conclusionStatement' - The statement that you want Amazon Lex to convey to the user after the
-- intent is successfully fulfilled by the Lambda function.
--
-- This element is relevant only if you provide a Lambda function in the
-- @fulfillmentActivity@. If you return the intent to the client
-- application, you can\'t specify this element.
--
-- The @followUpPrompt@ and @conclusionStatement@ are mutually exclusive.
-- You can specify only one.
--
-- 'confirmationPrompt', 'putIntent_confirmationPrompt' - Prompts the user to confirm the intent. This question should have a yes
-- or no answer.
--
-- Amazon Lex uses this prompt to ensure that the user acknowledges that
-- the intent is ready for fulfillment. For example, with the @OrderPizza@
-- intent, you might want to confirm that the order is correct before
-- placing it. For other intents, such as intents that simply respond to
-- user questions, you might not need to ask the user for confirmation
-- before providing the information.
--
-- You you must provide both the @rejectionStatement@ and the
-- @confirmationPrompt@, or neither.
--
-- 'createVersion', 'putIntent_createVersion' - When set to @true@ a new numbered version of the intent is created. This
-- is the same as calling the @CreateIntentVersion@ operation. If you do
-- not specify @createVersion@, the default is @false@.
--
-- 'description', 'putIntent_description' - A description of the intent.
--
-- 'dialogCodeHook', 'putIntent_dialogCodeHook' - Specifies a Lambda function to invoke for each user input. You can
-- invoke this Lambda function to personalize user interaction.
--
-- For example, suppose your bot determines that the user is John. Your
-- Lambda function might retrieve John\'s information from a backend
-- database and prepopulate some of the values. For example, if you find
-- that John is gluten intolerant, you might set the corresponding intent
-- slot, @GlutenIntolerant@, to true. You might find John\'s phone number
-- and set the corresponding session attribute.
--
-- 'followUpPrompt', 'putIntent_followUpPrompt' - Amazon Lex uses this prompt to solicit additional activity after
-- fulfilling an intent. For example, after the @OrderPizza@ intent is
-- fulfilled, you might prompt the user to order a drink.
--
-- The action that Amazon Lex takes depends on the user\'s response, as
-- follows:
--
-- -   If the user says \"Yes\" it responds with the clarification prompt
--     that is configured for the bot.
--
-- -   if the user says \"Yes\" and continues with an utterance that
--     triggers an intent it starts a conversation for the intent.
--
-- -   If the user says \"No\" it responds with the rejection statement
--     configured for the the follow-up prompt.
--
-- -   If it doesn\'t recognize the utterance it repeats the follow-up
--     prompt again.
--
-- The @followUpPrompt@ field and the @conclusionStatement@ field are
-- mutually exclusive. You can specify only one.
--
-- 'fulfillmentActivity', 'putIntent_fulfillmentActivity' - Required. Describes how the intent is fulfilled. For example, after a
-- user provides all of the information for a pizza order,
-- @fulfillmentActivity@ defines how the bot places an order with a local
-- pizza store.
--
-- You might configure Amazon Lex to return all of the intent information
-- to the client application, or direct it to invoke a Lambda function that
-- can process the intent (for example, place an order with a pizzeria).
--
-- 'inputContexts', 'putIntent_inputContexts' - An array of @InputContext@ objects that lists the contexts that must be
-- active for Amazon Lex to choose the intent in a conversation with the
-- user.
--
-- 'kendraConfiguration', 'putIntent_kendraConfiguration' - Configuration information required to use the
-- @AMAZON.KendraSearchIntent@ intent to connect to an Amazon Kendra index.
-- For more information, see
-- <http://docs.aws.amazon.com/lex/latest/dg/built-in-intent-kendra-search.html AMAZON.KendraSearchIntent>.
--
-- 'outputContexts', 'putIntent_outputContexts' - An array of @OutputContext@ objects that lists the contexts that the
-- intent activates when the intent is fulfilled.
--
-- 'parentIntentSignature', 'putIntent_parentIntentSignature' - A unique identifier for the built-in intent to base this intent on. To
-- find the signature for an intent, see
-- <https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents Standard Built-in Intents>
-- in the /Alexa Skills Kit/.
--
-- 'rejectionStatement', 'putIntent_rejectionStatement' - When the user answers \"no\" to the question defined in
-- @confirmationPrompt@, Amazon Lex responds with this statement to
-- acknowledge that the intent was canceled.
--
-- You must provide both the @rejectionStatement@ and the
-- @confirmationPrompt@, or neither.
--
-- 'sampleUtterances', 'putIntent_sampleUtterances' - An array of utterances (strings) that a user might say to signal the
-- intent. For example, \"I want {PizzaSize} pizza\", \"Order {Quantity}
-- {PizzaSize} pizzas\".
--
-- In each utterance, a slot name is enclosed in curly braces.
--
-- 'slots', 'putIntent_slots' - An array of intent slots. At runtime, Amazon Lex elicits required slot
-- values from the user using prompts defined in the slots. For more
-- information, see how-it-works.
--
-- 'name', 'putIntent_name' - The name of the intent. The name is /not/ case sensitive.
--
-- The name can\'t match a built-in intent name, or a built-in intent name
-- with \"AMAZON.\" removed. For example, because there is a built-in
-- intent called @AMAZON.HelpIntent@, you can\'t create a custom intent
-- called @HelpIntent@.
--
-- For a list of built-in intents, see
-- <https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents Standard Built-in Intents>
-- in the /Alexa Skills Kit/.
newPutIntent ::
  -- | 'name'
  Prelude.Text ->
  PutIntent
newPutIntent :: Text -> PutIntent
newPutIntent Text
pName_ =
  PutIntent'
    { $sel:checksum:PutIntent' :: Maybe Text
checksum = forall a. Maybe a
Prelude.Nothing,
      $sel:conclusionStatement:PutIntent' :: Maybe Statement
conclusionStatement = forall a. Maybe a
Prelude.Nothing,
      $sel:confirmationPrompt:PutIntent' :: Maybe Prompt
confirmationPrompt = forall a. Maybe a
Prelude.Nothing,
      $sel:createVersion:PutIntent' :: Maybe Bool
createVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:description:PutIntent' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:dialogCodeHook:PutIntent' :: Maybe CodeHook
dialogCodeHook = forall a. Maybe a
Prelude.Nothing,
      $sel:followUpPrompt:PutIntent' :: Maybe FollowUpPrompt
followUpPrompt = forall a. Maybe a
Prelude.Nothing,
      $sel:fulfillmentActivity:PutIntent' :: Maybe FulfillmentActivity
fulfillmentActivity = forall a. Maybe a
Prelude.Nothing,
      $sel:inputContexts:PutIntent' :: Maybe [InputContext]
inputContexts = forall a. Maybe a
Prelude.Nothing,
      $sel:kendraConfiguration:PutIntent' :: Maybe KendraConfiguration
kendraConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:outputContexts:PutIntent' :: Maybe [OutputContext]
outputContexts = forall a. Maybe a
Prelude.Nothing,
      $sel:parentIntentSignature:PutIntent' :: Maybe Text
parentIntentSignature = forall a. Maybe a
Prelude.Nothing,
      $sel:rejectionStatement:PutIntent' :: Maybe Statement
rejectionStatement = forall a. Maybe a
Prelude.Nothing,
      $sel:sampleUtterances:PutIntent' :: Maybe [Text]
sampleUtterances = forall a. Maybe a
Prelude.Nothing,
      $sel:slots:PutIntent' :: Maybe [Slot]
slots = forall a. Maybe a
Prelude.Nothing,
      $sel:name:PutIntent' :: Text
name = Text
pName_
    }

-- | Identifies a specific revision of the @$LATEST@ version.
--
-- When you create a new intent, leave the @checksum@ field blank. If you
-- specify a checksum you get a @BadRequestException@ exception.
--
-- When you want to update a intent, set the @checksum@ field to the
-- checksum of the most recent revision of the @$LATEST@ version. If you
-- don\'t specify the @ checksum@ field, or if the checksum does not match
-- the @$LATEST@ version, you get a @PreconditionFailedException@
-- exception.
putIntent_checksum :: Lens.Lens' PutIntent (Prelude.Maybe Prelude.Text)
putIntent_checksum :: Lens' PutIntent (Maybe Text)
putIntent_checksum = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntent' {Maybe Text
checksum :: Maybe Text
$sel:checksum:PutIntent' :: PutIntent -> Maybe Text
checksum} -> Maybe Text
checksum) (\s :: PutIntent
s@PutIntent' {} Maybe Text
a -> PutIntent
s {$sel:checksum:PutIntent' :: Maybe Text
checksum = Maybe Text
a} :: PutIntent)

-- | The statement that you want Amazon Lex to convey to the user after the
-- intent is successfully fulfilled by the Lambda function.
--
-- This element is relevant only if you provide a Lambda function in the
-- @fulfillmentActivity@. If you return the intent to the client
-- application, you can\'t specify this element.
--
-- The @followUpPrompt@ and @conclusionStatement@ are mutually exclusive.
-- You can specify only one.
putIntent_conclusionStatement :: Lens.Lens' PutIntent (Prelude.Maybe Statement)
putIntent_conclusionStatement :: Lens' PutIntent (Maybe Statement)
putIntent_conclusionStatement = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntent' {Maybe Statement
conclusionStatement :: Maybe Statement
$sel:conclusionStatement:PutIntent' :: PutIntent -> Maybe Statement
conclusionStatement} -> Maybe Statement
conclusionStatement) (\s :: PutIntent
s@PutIntent' {} Maybe Statement
a -> PutIntent
s {$sel:conclusionStatement:PutIntent' :: Maybe Statement
conclusionStatement = Maybe Statement
a} :: PutIntent)

-- | Prompts the user to confirm the intent. This question should have a yes
-- or no answer.
--
-- Amazon Lex uses this prompt to ensure that the user acknowledges that
-- the intent is ready for fulfillment. For example, with the @OrderPizza@
-- intent, you might want to confirm that the order is correct before
-- placing it. For other intents, such as intents that simply respond to
-- user questions, you might not need to ask the user for confirmation
-- before providing the information.
--
-- You you must provide both the @rejectionStatement@ and the
-- @confirmationPrompt@, or neither.
putIntent_confirmationPrompt :: Lens.Lens' PutIntent (Prelude.Maybe Prompt)
putIntent_confirmationPrompt :: Lens' PutIntent (Maybe Prompt)
putIntent_confirmationPrompt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntent' {Maybe Prompt
confirmationPrompt :: Maybe Prompt
$sel:confirmationPrompt:PutIntent' :: PutIntent -> Maybe Prompt
confirmationPrompt} -> Maybe Prompt
confirmationPrompt) (\s :: PutIntent
s@PutIntent' {} Maybe Prompt
a -> PutIntent
s {$sel:confirmationPrompt:PutIntent' :: Maybe Prompt
confirmationPrompt = Maybe Prompt
a} :: PutIntent)

-- | When set to @true@ a new numbered version of the intent is created. This
-- is the same as calling the @CreateIntentVersion@ operation. If you do
-- not specify @createVersion@, the default is @false@.
putIntent_createVersion :: Lens.Lens' PutIntent (Prelude.Maybe Prelude.Bool)
putIntent_createVersion :: Lens' PutIntent (Maybe Bool)
putIntent_createVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntent' {Maybe Bool
createVersion :: Maybe Bool
$sel:createVersion:PutIntent' :: PutIntent -> Maybe Bool
createVersion} -> Maybe Bool
createVersion) (\s :: PutIntent
s@PutIntent' {} Maybe Bool
a -> PutIntent
s {$sel:createVersion:PutIntent' :: Maybe Bool
createVersion = Maybe Bool
a} :: PutIntent)

-- | A description of the intent.
putIntent_description :: Lens.Lens' PutIntent (Prelude.Maybe Prelude.Text)
putIntent_description :: Lens' PutIntent (Maybe Text)
putIntent_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntent' {Maybe Text
description :: Maybe Text
$sel:description:PutIntent' :: PutIntent -> Maybe Text
description} -> Maybe Text
description) (\s :: PutIntent
s@PutIntent' {} Maybe Text
a -> PutIntent
s {$sel:description:PutIntent' :: Maybe Text
description = Maybe Text
a} :: PutIntent)

-- | Specifies a Lambda function to invoke for each user input. You can
-- invoke this Lambda function to personalize user interaction.
--
-- For example, suppose your bot determines that the user is John. Your
-- Lambda function might retrieve John\'s information from a backend
-- database and prepopulate some of the values. For example, if you find
-- that John is gluten intolerant, you might set the corresponding intent
-- slot, @GlutenIntolerant@, to true. You might find John\'s phone number
-- and set the corresponding session attribute.
putIntent_dialogCodeHook :: Lens.Lens' PutIntent (Prelude.Maybe CodeHook)
putIntent_dialogCodeHook :: Lens' PutIntent (Maybe CodeHook)
putIntent_dialogCodeHook = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntent' {Maybe CodeHook
dialogCodeHook :: Maybe CodeHook
$sel:dialogCodeHook:PutIntent' :: PutIntent -> Maybe CodeHook
dialogCodeHook} -> Maybe CodeHook
dialogCodeHook) (\s :: PutIntent
s@PutIntent' {} Maybe CodeHook
a -> PutIntent
s {$sel:dialogCodeHook:PutIntent' :: Maybe CodeHook
dialogCodeHook = Maybe CodeHook
a} :: PutIntent)

-- | Amazon Lex uses this prompt to solicit additional activity after
-- fulfilling an intent. For example, after the @OrderPizza@ intent is
-- fulfilled, you might prompt the user to order a drink.
--
-- The action that Amazon Lex takes depends on the user\'s response, as
-- follows:
--
-- -   If the user says \"Yes\" it responds with the clarification prompt
--     that is configured for the bot.
--
-- -   if the user says \"Yes\" and continues with an utterance that
--     triggers an intent it starts a conversation for the intent.
--
-- -   If the user says \"No\" it responds with the rejection statement
--     configured for the the follow-up prompt.
--
-- -   If it doesn\'t recognize the utterance it repeats the follow-up
--     prompt again.
--
-- The @followUpPrompt@ field and the @conclusionStatement@ field are
-- mutually exclusive. You can specify only one.
putIntent_followUpPrompt :: Lens.Lens' PutIntent (Prelude.Maybe FollowUpPrompt)
putIntent_followUpPrompt :: Lens' PutIntent (Maybe FollowUpPrompt)
putIntent_followUpPrompt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntent' {Maybe FollowUpPrompt
followUpPrompt :: Maybe FollowUpPrompt
$sel:followUpPrompt:PutIntent' :: PutIntent -> Maybe FollowUpPrompt
followUpPrompt} -> Maybe FollowUpPrompt
followUpPrompt) (\s :: PutIntent
s@PutIntent' {} Maybe FollowUpPrompt
a -> PutIntent
s {$sel:followUpPrompt:PutIntent' :: Maybe FollowUpPrompt
followUpPrompt = Maybe FollowUpPrompt
a} :: PutIntent)

-- | Required. Describes how the intent is fulfilled. For example, after a
-- user provides all of the information for a pizza order,
-- @fulfillmentActivity@ defines how the bot places an order with a local
-- pizza store.
--
-- You might configure Amazon Lex to return all of the intent information
-- to the client application, or direct it to invoke a Lambda function that
-- can process the intent (for example, place an order with a pizzeria).
putIntent_fulfillmentActivity :: Lens.Lens' PutIntent (Prelude.Maybe FulfillmentActivity)
putIntent_fulfillmentActivity :: Lens' PutIntent (Maybe FulfillmentActivity)
putIntent_fulfillmentActivity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntent' {Maybe FulfillmentActivity
fulfillmentActivity :: Maybe FulfillmentActivity
$sel:fulfillmentActivity:PutIntent' :: PutIntent -> Maybe FulfillmentActivity
fulfillmentActivity} -> Maybe FulfillmentActivity
fulfillmentActivity) (\s :: PutIntent
s@PutIntent' {} Maybe FulfillmentActivity
a -> PutIntent
s {$sel:fulfillmentActivity:PutIntent' :: Maybe FulfillmentActivity
fulfillmentActivity = Maybe FulfillmentActivity
a} :: PutIntent)

-- | An array of @InputContext@ objects that lists the contexts that must be
-- active for Amazon Lex to choose the intent in a conversation with the
-- user.
putIntent_inputContexts :: Lens.Lens' PutIntent (Prelude.Maybe [InputContext])
putIntent_inputContexts :: Lens' PutIntent (Maybe [InputContext])
putIntent_inputContexts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntent' {Maybe [InputContext]
inputContexts :: Maybe [InputContext]
$sel:inputContexts:PutIntent' :: PutIntent -> Maybe [InputContext]
inputContexts} -> Maybe [InputContext]
inputContexts) (\s :: PutIntent
s@PutIntent' {} Maybe [InputContext]
a -> PutIntent
s {$sel:inputContexts:PutIntent' :: Maybe [InputContext]
inputContexts = Maybe [InputContext]
a} :: PutIntent) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Configuration information required to use the
-- @AMAZON.KendraSearchIntent@ intent to connect to an Amazon Kendra index.
-- For more information, see
-- <http://docs.aws.amazon.com/lex/latest/dg/built-in-intent-kendra-search.html AMAZON.KendraSearchIntent>.
putIntent_kendraConfiguration :: Lens.Lens' PutIntent (Prelude.Maybe KendraConfiguration)
putIntent_kendraConfiguration :: Lens' PutIntent (Maybe KendraConfiguration)
putIntent_kendraConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntent' {Maybe KendraConfiguration
kendraConfiguration :: Maybe KendraConfiguration
$sel:kendraConfiguration:PutIntent' :: PutIntent -> Maybe KendraConfiguration
kendraConfiguration} -> Maybe KendraConfiguration
kendraConfiguration) (\s :: PutIntent
s@PutIntent' {} Maybe KendraConfiguration
a -> PutIntent
s {$sel:kendraConfiguration:PutIntent' :: Maybe KendraConfiguration
kendraConfiguration = Maybe KendraConfiguration
a} :: PutIntent)

-- | An array of @OutputContext@ objects that lists the contexts that the
-- intent activates when the intent is fulfilled.
putIntent_outputContexts :: Lens.Lens' PutIntent (Prelude.Maybe [OutputContext])
putIntent_outputContexts :: Lens' PutIntent (Maybe [OutputContext])
putIntent_outputContexts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntent' {Maybe [OutputContext]
outputContexts :: Maybe [OutputContext]
$sel:outputContexts:PutIntent' :: PutIntent -> Maybe [OutputContext]
outputContexts} -> Maybe [OutputContext]
outputContexts) (\s :: PutIntent
s@PutIntent' {} Maybe [OutputContext]
a -> PutIntent
s {$sel:outputContexts:PutIntent' :: Maybe [OutputContext]
outputContexts = Maybe [OutputContext]
a} :: PutIntent) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A unique identifier for the built-in intent to base this intent on. To
-- find the signature for an intent, see
-- <https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents Standard Built-in Intents>
-- in the /Alexa Skills Kit/.
putIntent_parentIntentSignature :: Lens.Lens' PutIntent (Prelude.Maybe Prelude.Text)
putIntent_parentIntentSignature :: Lens' PutIntent (Maybe Text)
putIntent_parentIntentSignature = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntent' {Maybe Text
parentIntentSignature :: Maybe Text
$sel:parentIntentSignature:PutIntent' :: PutIntent -> Maybe Text
parentIntentSignature} -> Maybe Text
parentIntentSignature) (\s :: PutIntent
s@PutIntent' {} Maybe Text
a -> PutIntent
s {$sel:parentIntentSignature:PutIntent' :: Maybe Text
parentIntentSignature = Maybe Text
a} :: PutIntent)

-- | When the user answers \"no\" to the question defined in
-- @confirmationPrompt@, Amazon Lex responds with this statement to
-- acknowledge that the intent was canceled.
--
-- You must provide both the @rejectionStatement@ and the
-- @confirmationPrompt@, or neither.
putIntent_rejectionStatement :: Lens.Lens' PutIntent (Prelude.Maybe Statement)
putIntent_rejectionStatement :: Lens' PutIntent (Maybe Statement)
putIntent_rejectionStatement = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntent' {Maybe Statement
rejectionStatement :: Maybe Statement
$sel:rejectionStatement:PutIntent' :: PutIntent -> Maybe Statement
rejectionStatement} -> Maybe Statement
rejectionStatement) (\s :: PutIntent
s@PutIntent' {} Maybe Statement
a -> PutIntent
s {$sel:rejectionStatement:PutIntent' :: Maybe Statement
rejectionStatement = Maybe Statement
a} :: PutIntent)

-- | An array of utterances (strings) that a user might say to signal the
-- intent. For example, \"I want {PizzaSize} pizza\", \"Order {Quantity}
-- {PizzaSize} pizzas\".
--
-- In each utterance, a slot name is enclosed in curly braces.
putIntent_sampleUtterances :: Lens.Lens' PutIntent (Prelude.Maybe [Prelude.Text])
putIntent_sampleUtterances :: Lens' PutIntent (Maybe [Text])
putIntent_sampleUtterances = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntent' {Maybe [Text]
sampleUtterances :: Maybe [Text]
$sel:sampleUtterances:PutIntent' :: PutIntent -> Maybe [Text]
sampleUtterances} -> Maybe [Text]
sampleUtterances) (\s :: PutIntent
s@PutIntent' {} Maybe [Text]
a -> PutIntent
s {$sel:sampleUtterances:PutIntent' :: Maybe [Text]
sampleUtterances = Maybe [Text]
a} :: PutIntent) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An array of intent slots. At runtime, Amazon Lex elicits required slot
-- values from the user using prompts defined in the slots. For more
-- information, see how-it-works.
putIntent_slots :: Lens.Lens' PutIntent (Prelude.Maybe [Slot])
putIntent_slots :: Lens' PutIntent (Maybe [Slot])
putIntent_slots = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntent' {Maybe [Slot]
slots :: Maybe [Slot]
$sel:slots:PutIntent' :: PutIntent -> Maybe [Slot]
slots} -> Maybe [Slot]
slots) (\s :: PutIntent
s@PutIntent' {} Maybe [Slot]
a -> PutIntent
s {$sel:slots:PutIntent' :: Maybe [Slot]
slots = Maybe [Slot]
a} :: PutIntent) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the intent. The name is /not/ case sensitive.
--
-- The name can\'t match a built-in intent name, or a built-in intent name
-- with \"AMAZON.\" removed. For example, because there is a built-in
-- intent called @AMAZON.HelpIntent@, you can\'t create a custom intent
-- called @HelpIntent@.
--
-- For a list of built-in intents, see
-- <https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents Standard Built-in Intents>
-- in the /Alexa Skills Kit/.
putIntent_name :: Lens.Lens' PutIntent Prelude.Text
putIntent_name :: Lens' PutIntent Text
putIntent_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntent' {Text
name :: Text
$sel:name:PutIntent' :: PutIntent -> Text
name} -> Text
name) (\s :: PutIntent
s@PutIntent' {} Text
a -> PutIntent
s {$sel:name:PutIntent' :: Text
name = Text
a} :: PutIntent)

instance Core.AWSRequest PutIntent where
  type AWSResponse PutIntent = PutIntentResponse
  request :: (Service -> Service) -> PutIntent -> Request PutIntent
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy PutIntent
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutIntent)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Statement
-> Maybe Prompt
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe CodeHook
-> Maybe FollowUpPrompt
-> Maybe FulfillmentActivity
-> Maybe [InputContext]
-> Maybe KendraConfiguration
-> Maybe POSIX
-> Maybe Text
-> Maybe [OutputContext]
-> Maybe Text
-> Maybe Statement
-> Maybe [Text]
-> Maybe [Slot]
-> Maybe Text
-> Int
-> PutIntentResponse
PutIntentResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"checksum")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"conclusionStatement")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"confirmationPrompt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"createVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"createdDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"dialogCodeHook")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"followUpPrompt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"fulfillmentActivity")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"inputContexts" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"kendraConfiguration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"lastUpdatedDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"outputContexts" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"parentIntentSignature")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"rejectionStatement")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"sampleUtterances"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"slots" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"version")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable PutIntent where
  hashWithSalt :: Int -> PutIntent -> Int
hashWithSalt Int
_salt PutIntent' {Maybe Bool
Maybe [Text]
Maybe [InputContext]
Maybe [OutputContext]
Maybe [Slot]
Maybe Text
Maybe CodeHook
Maybe FulfillmentActivity
Maybe KendraConfiguration
Maybe Prompt
Maybe Statement
Maybe FollowUpPrompt
Text
name :: Text
slots :: Maybe [Slot]
sampleUtterances :: Maybe [Text]
rejectionStatement :: Maybe Statement
parentIntentSignature :: Maybe Text
outputContexts :: Maybe [OutputContext]
kendraConfiguration :: Maybe KendraConfiguration
inputContexts :: Maybe [InputContext]
fulfillmentActivity :: Maybe FulfillmentActivity
followUpPrompt :: Maybe FollowUpPrompt
dialogCodeHook :: Maybe CodeHook
description :: Maybe Text
createVersion :: Maybe Bool
confirmationPrompt :: Maybe Prompt
conclusionStatement :: Maybe Statement
checksum :: Maybe Text
$sel:name:PutIntent' :: PutIntent -> Text
$sel:slots:PutIntent' :: PutIntent -> Maybe [Slot]
$sel:sampleUtterances:PutIntent' :: PutIntent -> Maybe [Text]
$sel:rejectionStatement:PutIntent' :: PutIntent -> Maybe Statement
$sel:parentIntentSignature:PutIntent' :: PutIntent -> Maybe Text
$sel:outputContexts:PutIntent' :: PutIntent -> Maybe [OutputContext]
$sel:kendraConfiguration:PutIntent' :: PutIntent -> Maybe KendraConfiguration
$sel:inputContexts:PutIntent' :: PutIntent -> Maybe [InputContext]
$sel:fulfillmentActivity:PutIntent' :: PutIntent -> Maybe FulfillmentActivity
$sel:followUpPrompt:PutIntent' :: PutIntent -> Maybe FollowUpPrompt
$sel:dialogCodeHook:PutIntent' :: PutIntent -> Maybe CodeHook
$sel:description:PutIntent' :: PutIntent -> Maybe Text
$sel:createVersion:PutIntent' :: PutIntent -> Maybe Bool
$sel:confirmationPrompt:PutIntent' :: PutIntent -> Maybe Prompt
$sel:conclusionStatement:PutIntent' :: PutIntent -> Maybe Statement
$sel:checksum:PutIntent' :: PutIntent -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
checksum
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Statement
conclusionStatement
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Prompt
confirmationPrompt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
createVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CodeHook
dialogCodeHook
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FollowUpPrompt
followUpPrompt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FulfillmentActivity
fulfillmentActivity
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [InputContext]
inputContexts
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe KendraConfiguration
kendraConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [OutputContext]
outputContexts
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
parentIntentSignature
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Statement
rejectionStatement
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
sampleUtterances
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Slot]
slots
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance Prelude.NFData PutIntent where
  rnf :: PutIntent -> ()
rnf PutIntent' {Maybe Bool
Maybe [Text]
Maybe [InputContext]
Maybe [OutputContext]
Maybe [Slot]
Maybe Text
Maybe CodeHook
Maybe FulfillmentActivity
Maybe KendraConfiguration
Maybe Prompt
Maybe Statement
Maybe FollowUpPrompt
Text
name :: Text
slots :: Maybe [Slot]
sampleUtterances :: Maybe [Text]
rejectionStatement :: Maybe Statement
parentIntentSignature :: Maybe Text
outputContexts :: Maybe [OutputContext]
kendraConfiguration :: Maybe KendraConfiguration
inputContexts :: Maybe [InputContext]
fulfillmentActivity :: Maybe FulfillmentActivity
followUpPrompt :: Maybe FollowUpPrompt
dialogCodeHook :: Maybe CodeHook
description :: Maybe Text
createVersion :: Maybe Bool
confirmationPrompt :: Maybe Prompt
conclusionStatement :: Maybe Statement
checksum :: Maybe Text
$sel:name:PutIntent' :: PutIntent -> Text
$sel:slots:PutIntent' :: PutIntent -> Maybe [Slot]
$sel:sampleUtterances:PutIntent' :: PutIntent -> Maybe [Text]
$sel:rejectionStatement:PutIntent' :: PutIntent -> Maybe Statement
$sel:parentIntentSignature:PutIntent' :: PutIntent -> Maybe Text
$sel:outputContexts:PutIntent' :: PutIntent -> Maybe [OutputContext]
$sel:kendraConfiguration:PutIntent' :: PutIntent -> Maybe KendraConfiguration
$sel:inputContexts:PutIntent' :: PutIntent -> Maybe [InputContext]
$sel:fulfillmentActivity:PutIntent' :: PutIntent -> Maybe FulfillmentActivity
$sel:followUpPrompt:PutIntent' :: PutIntent -> Maybe FollowUpPrompt
$sel:dialogCodeHook:PutIntent' :: PutIntent -> Maybe CodeHook
$sel:description:PutIntent' :: PutIntent -> Maybe Text
$sel:createVersion:PutIntent' :: PutIntent -> Maybe Bool
$sel:confirmationPrompt:PutIntent' :: PutIntent -> Maybe Prompt
$sel:conclusionStatement:PutIntent' :: PutIntent -> Maybe Statement
$sel:checksum:PutIntent' :: PutIntent -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
checksum
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Statement
conclusionStatement
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Prompt
confirmationPrompt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
createVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CodeHook
dialogCodeHook
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FollowUpPrompt
followUpPrompt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FulfillmentActivity
fulfillmentActivity
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [InputContext]
inputContexts
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe KendraConfiguration
kendraConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [OutputContext]
outputContexts
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
parentIntentSignature
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Statement
rejectionStatement
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
sampleUtterances
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Slot]
slots
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name

instance Data.ToHeaders PutIntent where
  toHeaders :: PutIntent -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON PutIntent where
  toJSON :: PutIntent -> Value
toJSON PutIntent' {Maybe Bool
Maybe [Text]
Maybe [InputContext]
Maybe [OutputContext]
Maybe [Slot]
Maybe Text
Maybe CodeHook
Maybe FulfillmentActivity
Maybe KendraConfiguration
Maybe Prompt
Maybe Statement
Maybe FollowUpPrompt
Text
name :: Text
slots :: Maybe [Slot]
sampleUtterances :: Maybe [Text]
rejectionStatement :: Maybe Statement
parentIntentSignature :: Maybe Text
outputContexts :: Maybe [OutputContext]
kendraConfiguration :: Maybe KendraConfiguration
inputContexts :: Maybe [InputContext]
fulfillmentActivity :: Maybe FulfillmentActivity
followUpPrompt :: Maybe FollowUpPrompt
dialogCodeHook :: Maybe CodeHook
description :: Maybe Text
createVersion :: Maybe Bool
confirmationPrompt :: Maybe Prompt
conclusionStatement :: Maybe Statement
checksum :: Maybe Text
$sel:name:PutIntent' :: PutIntent -> Text
$sel:slots:PutIntent' :: PutIntent -> Maybe [Slot]
$sel:sampleUtterances:PutIntent' :: PutIntent -> Maybe [Text]
$sel:rejectionStatement:PutIntent' :: PutIntent -> Maybe Statement
$sel:parentIntentSignature:PutIntent' :: PutIntent -> Maybe Text
$sel:outputContexts:PutIntent' :: PutIntent -> Maybe [OutputContext]
$sel:kendraConfiguration:PutIntent' :: PutIntent -> Maybe KendraConfiguration
$sel:inputContexts:PutIntent' :: PutIntent -> Maybe [InputContext]
$sel:fulfillmentActivity:PutIntent' :: PutIntent -> Maybe FulfillmentActivity
$sel:followUpPrompt:PutIntent' :: PutIntent -> Maybe FollowUpPrompt
$sel:dialogCodeHook:PutIntent' :: PutIntent -> Maybe CodeHook
$sel:description:PutIntent' :: PutIntent -> Maybe Text
$sel:createVersion:PutIntent' :: PutIntent -> Maybe Bool
$sel:confirmationPrompt:PutIntent' :: PutIntent -> Maybe Prompt
$sel:conclusionStatement:PutIntent' :: PutIntent -> Maybe Statement
$sel:checksum:PutIntent' :: PutIntent -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"checksum" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
checksum,
            (Key
"conclusionStatement" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Statement
conclusionStatement,
            (Key
"confirmationPrompt" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Prompt
confirmationPrompt,
            (Key
"createVersion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
createVersion,
            (Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Key
"dialogCodeHook" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CodeHook
dialogCodeHook,
            (Key
"followUpPrompt" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FollowUpPrompt
followUpPrompt,
            (Key
"fulfillmentActivity" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FulfillmentActivity
fulfillmentActivity,
            (Key
"inputContexts" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InputContext]
inputContexts,
            (Key
"kendraConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KendraConfiguration
kendraConfiguration,
            (Key
"outputContexts" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [OutputContext]
outputContexts,
            (Key
"parentIntentSignature" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
parentIntentSignature,
            (Key
"rejectionStatement" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Statement
rejectionStatement,
            (Key
"sampleUtterances" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
sampleUtterances,
            (Key
"slots" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Slot]
slots
          ]
      )

instance Data.ToPath PutIntent where
  toPath :: PutIntent -> ByteString
toPath PutIntent' {Maybe Bool
Maybe [Text]
Maybe [InputContext]
Maybe [OutputContext]
Maybe [Slot]
Maybe Text
Maybe CodeHook
Maybe FulfillmentActivity
Maybe KendraConfiguration
Maybe Prompt
Maybe Statement
Maybe FollowUpPrompt
Text
name :: Text
slots :: Maybe [Slot]
sampleUtterances :: Maybe [Text]
rejectionStatement :: Maybe Statement
parentIntentSignature :: Maybe Text
outputContexts :: Maybe [OutputContext]
kendraConfiguration :: Maybe KendraConfiguration
inputContexts :: Maybe [InputContext]
fulfillmentActivity :: Maybe FulfillmentActivity
followUpPrompt :: Maybe FollowUpPrompt
dialogCodeHook :: Maybe CodeHook
description :: Maybe Text
createVersion :: Maybe Bool
confirmationPrompt :: Maybe Prompt
conclusionStatement :: Maybe Statement
checksum :: Maybe Text
$sel:name:PutIntent' :: PutIntent -> Text
$sel:slots:PutIntent' :: PutIntent -> Maybe [Slot]
$sel:sampleUtterances:PutIntent' :: PutIntent -> Maybe [Text]
$sel:rejectionStatement:PutIntent' :: PutIntent -> Maybe Statement
$sel:parentIntentSignature:PutIntent' :: PutIntent -> Maybe Text
$sel:outputContexts:PutIntent' :: PutIntent -> Maybe [OutputContext]
$sel:kendraConfiguration:PutIntent' :: PutIntent -> Maybe KendraConfiguration
$sel:inputContexts:PutIntent' :: PutIntent -> Maybe [InputContext]
$sel:fulfillmentActivity:PutIntent' :: PutIntent -> Maybe FulfillmentActivity
$sel:followUpPrompt:PutIntent' :: PutIntent -> Maybe FollowUpPrompt
$sel:dialogCodeHook:PutIntent' :: PutIntent -> Maybe CodeHook
$sel:description:PutIntent' :: PutIntent -> Maybe Text
$sel:createVersion:PutIntent' :: PutIntent -> Maybe Bool
$sel:confirmationPrompt:PutIntent' :: PutIntent -> Maybe Prompt
$sel:conclusionStatement:PutIntent' :: PutIntent -> Maybe Statement
$sel:checksum:PutIntent' :: PutIntent -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/intents/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
name, ByteString
"/versions/$LATEST"]

instance Data.ToQuery PutIntent where
  toQuery :: PutIntent -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newPutIntentResponse' smart constructor.
data PutIntentResponse = PutIntentResponse'
  { -- | Checksum of the @$LATEST@version of the intent created or updated.
    PutIntentResponse -> Maybe Text
checksum :: Prelude.Maybe Prelude.Text,
    -- | After the Lambda function specified in the@fulfillmentActivity@intent
    -- fulfills the intent, Amazon Lex conveys this statement to the user.
    PutIntentResponse -> Maybe Statement
conclusionStatement :: Prelude.Maybe Statement,
    -- | If defined in the intent, Amazon Lex prompts the user to confirm the
    -- intent before fulfilling it.
    PutIntentResponse -> Maybe Prompt
confirmationPrompt :: Prelude.Maybe Prompt,
    -- | @True@ if a new version of the intent was created. If the
    -- @createVersion@ field was not specified in the request, the
    -- @createVersion@ field is set to false in the response.
    PutIntentResponse -> Maybe Bool
createVersion :: Prelude.Maybe Prelude.Bool,
    -- | The date that the intent was created.
    PutIntentResponse -> Maybe POSIX
createdDate :: Prelude.Maybe Data.POSIX,
    -- | A description of the intent.
    PutIntentResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | If defined in the intent, Amazon Lex invokes this Lambda function for
    -- each user input.
    PutIntentResponse -> Maybe CodeHook
dialogCodeHook :: Prelude.Maybe CodeHook,
    -- | If defined in the intent, Amazon Lex uses this prompt to solicit
    -- additional user activity after the intent is fulfilled.
    PutIntentResponse -> Maybe FollowUpPrompt
followUpPrompt :: Prelude.Maybe FollowUpPrompt,
    -- | If defined in the intent, Amazon Lex invokes this Lambda function to
    -- fulfill the intent after the user provides all of the information
    -- required by the intent.
    PutIntentResponse -> Maybe FulfillmentActivity
fulfillmentActivity :: Prelude.Maybe FulfillmentActivity,
    -- | An array of @InputContext@ objects that lists the contexts that must be
    -- active for Amazon Lex to choose the intent in a conversation with the
    -- user.
    PutIntentResponse -> Maybe [InputContext]
inputContexts :: Prelude.Maybe [InputContext],
    -- | Configuration information, if any, required to connect to an Amazon
    -- Kendra index and use the @AMAZON.KendraSearchIntent@ intent.
    PutIntentResponse -> Maybe KendraConfiguration
kendraConfiguration :: Prelude.Maybe KendraConfiguration,
    -- | The date that the intent was updated. When you create a resource, the
    -- creation date and last update dates are the same.
    PutIntentResponse -> Maybe POSIX
lastUpdatedDate :: Prelude.Maybe Data.POSIX,
    -- | The name of the intent.
    PutIntentResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | An array of @OutputContext@ objects that lists the contexts that the
    -- intent activates when the intent is fulfilled.
    PutIntentResponse -> Maybe [OutputContext]
outputContexts :: Prelude.Maybe [OutputContext],
    -- | A unique identifier for the built-in intent that this intent is based
    -- on.
    PutIntentResponse -> Maybe Text
parentIntentSignature :: Prelude.Maybe Prelude.Text,
    -- | If the user answers \"no\" to the question defined in
    -- @confirmationPrompt@ Amazon Lex responds with this statement to
    -- acknowledge that the intent was canceled.
    PutIntentResponse -> Maybe Statement
rejectionStatement :: Prelude.Maybe Statement,
    -- | An array of sample utterances that are configured for the intent.
    PutIntentResponse -> Maybe [Text]
sampleUtterances :: Prelude.Maybe [Prelude.Text],
    -- | An array of intent slots that are configured for the intent.
    PutIntentResponse -> Maybe [Slot]
slots :: Prelude.Maybe [Slot],
    -- | The version of the intent. For a new intent, the version is always
    -- @$LATEST@.
    PutIntentResponse -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    PutIntentResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (PutIntentResponse -> PutIntentResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutIntentResponse -> PutIntentResponse -> Bool
$c/= :: PutIntentResponse -> PutIntentResponse -> Bool
== :: PutIntentResponse -> PutIntentResponse -> Bool
$c== :: PutIntentResponse -> PutIntentResponse -> Bool
Prelude.Eq, ReadPrec [PutIntentResponse]
ReadPrec PutIntentResponse
Int -> ReadS PutIntentResponse
ReadS [PutIntentResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutIntentResponse]
$creadListPrec :: ReadPrec [PutIntentResponse]
readPrec :: ReadPrec PutIntentResponse
$creadPrec :: ReadPrec PutIntentResponse
readList :: ReadS [PutIntentResponse]
$creadList :: ReadS [PutIntentResponse]
readsPrec :: Int -> ReadS PutIntentResponse
$creadsPrec :: Int -> ReadS PutIntentResponse
Prelude.Read, Int -> PutIntentResponse -> ShowS
[PutIntentResponse] -> ShowS
PutIntentResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutIntentResponse] -> ShowS
$cshowList :: [PutIntentResponse] -> ShowS
show :: PutIntentResponse -> String
$cshow :: PutIntentResponse -> String
showsPrec :: Int -> PutIntentResponse -> ShowS
$cshowsPrec :: Int -> PutIntentResponse -> ShowS
Prelude.Show, forall x. Rep PutIntentResponse x -> PutIntentResponse
forall x. PutIntentResponse -> Rep PutIntentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutIntentResponse x -> PutIntentResponse
$cfrom :: forall x. PutIntentResponse -> Rep PutIntentResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutIntentResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'checksum', 'putIntentResponse_checksum' - Checksum of the @$LATEST@version of the intent created or updated.
--
-- 'conclusionStatement', 'putIntentResponse_conclusionStatement' - After the Lambda function specified in the@fulfillmentActivity@intent
-- fulfills the intent, Amazon Lex conveys this statement to the user.
--
-- 'confirmationPrompt', 'putIntentResponse_confirmationPrompt' - If defined in the intent, Amazon Lex prompts the user to confirm the
-- intent before fulfilling it.
--
-- 'createVersion', 'putIntentResponse_createVersion' - @True@ if a new version of the intent was created. If the
-- @createVersion@ field was not specified in the request, the
-- @createVersion@ field is set to false in the response.
--
-- 'createdDate', 'putIntentResponse_createdDate' - The date that the intent was created.
--
-- 'description', 'putIntentResponse_description' - A description of the intent.
--
-- 'dialogCodeHook', 'putIntentResponse_dialogCodeHook' - If defined in the intent, Amazon Lex invokes this Lambda function for
-- each user input.
--
-- 'followUpPrompt', 'putIntentResponse_followUpPrompt' - If defined in the intent, Amazon Lex uses this prompt to solicit
-- additional user activity after the intent is fulfilled.
--
-- 'fulfillmentActivity', 'putIntentResponse_fulfillmentActivity' - If defined in the intent, Amazon Lex invokes this Lambda function to
-- fulfill the intent after the user provides all of the information
-- required by the intent.
--
-- 'inputContexts', 'putIntentResponse_inputContexts' - An array of @InputContext@ objects that lists the contexts that must be
-- active for Amazon Lex to choose the intent in a conversation with the
-- user.
--
-- 'kendraConfiguration', 'putIntentResponse_kendraConfiguration' - Configuration information, if any, required to connect to an Amazon
-- Kendra index and use the @AMAZON.KendraSearchIntent@ intent.
--
-- 'lastUpdatedDate', 'putIntentResponse_lastUpdatedDate' - The date that the intent was updated. When you create a resource, the
-- creation date and last update dates are the same.
--
-- 'name', 'putIntentResponse_name' - The name of the intent.
--
-- 'outputContexts', 'putIntentResponse_outputContexts' - An array of @OutputContext@ objects that lists the contexts that the
-- intent activates when the intent is fulfilled.
--
-- 'parentIntentSignature', 'putIntentResponse_parentIntentSignature' - A unique identifier for the built-in intent that this intent is based
-- on.
--
-- 'rejectionStatement', 'putIntentResponse_rejectionStatement' - If the user answers \"no\" to the question defined in
-- @confirmationPrompt@ Amazon Lex responds with this statement to
-- acknowledge that the intent was canceled.
--
-- 'sampleUtterances', 'putIntentResponse_sampleUtterances' - An array of sample utterances that are configured for the intent.
--
-- 'slots', 'putIntentResponse_slots' - An array of intent slots that are configured for the intent.
--
-- 'version', 'putIntentResponse_version' - The version of the intent. For a new intent, the version is always
-- @$LATEST@.
--
-- 'httpStatus', 'putIntentResponse_httpStatus' - The response's http status code.
newPutIntentResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutIntentResponse
newPutIntentResponse :: Int -> PutIntentResponse
newPutIntentResponse Int
pHttpStatus_ =
  PutIntentResponse'
    { $sel:checksum:PutIntentResponse' :: Maybe Text
checksum = forall a. Maybe a
Prelude.Nothing,
      $sel:conclusionStatement:PutIntentResponse' :: Maybe Statement
conclusionStatement = forall a. Maybe a
Prelude.Nothing,
      $sel:confirmationPrompt:PutIntentResponse' :: Maybe Prompt
confirmationPrompt = forall a. Maybe a
Prelude.Nothing,
      $sel:createVersion:PutIntentResponse' :: Maybe Bool
createVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:PutIntentResponse' :: Maybe POSIX
createdDate = forall a. Maybe a
Prelude.Nothing,
      $sel:description:PutIntentResponse' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:dialogCodeHook:PutIntentResponse' :: Maybe CodeHook
dialogCodeHook = forall a. Maybe a
Prelude.Nothing,
      $sel:followUpPrompt:PutIntentResponse' :: Maybe FollowUpPrompt
followUpPrompt = forall a. Maybe a
Prelude.Nothing,
      $sel:fulfillmentActivity:PutIntentResponse' :: Maybe FulfillmentActivity
fulfillmentActivity = forall a. Maybe a
Prelude.Nothing,
      $sel:inputContexts:PutIntentResponse' :: Maybe [InputContext]
inputContexts = forall a. Maybe a
Prelude.Nothing,
      $sel:kendraConfiguration:PutIntentResponse' :: Maybe KendraConfiguration
kendraConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDate:PutIntentResponse' :: Maybe POSIX
lastUpdatedDate = forall a. Maybe a
Prelude.Nothing,
      $sel:name:PutIntentResponse' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:outputContexts:PutIntentResponse' :: Maybe [OutputContext]
outputContexts = forall a. Maybe a
Prelude.Nothing,
      $sel:parentIntentSignature:PutIntentResponse' :: Maybe Text
parentIntentSignature = forall a. Maybe a
Prelude.Nothing,
      $sel:rejectionStatement:PutIntentResponse' :: Maybe Statement
rejectionStatement = forall a. Maybe a
Prelude.Nothing,
      $sel:sampleUtterances:PutIntentResponse' :: Maybe [Text]
sampleUtterances = forall a. Maybe a
Prelude.Nothing,
      $sel:slots:PutIntentResponse' :: Maybe [Slot]
slots = forall a. Maybe a
Prelude.Nothing,
      $sel:version:PutIntentResponse' :: Maybe Text
version = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:PutIntentResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Checksum of the @$LATEST@version of the intent created or updated.
putIntentResponse_checksum :: Lens.Lens' PutIntentResponse (Prelude.Maybe Prelude.Text)
putIntentResponse_checksum :: Lens' PutIntentResponse (Maybe Text)
putIntentResponse_checksum = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Maybe Text
checksum :: Maybe Text
$sel:checksum:PutIntentResponse' :: PutIntentResponse -> Maybe Text
checksum} -> Maybe Text
checksum) (\s :: PutIntentResponse
s@PutIntentResponse' {} Maybe Text
a -> PutIntentResponse
s {$sel:checksum:PutIntentResponse' :: Maybe Text
checksum = Maybe Text
a} :: PutIntentResponse)

-- | After the Lambda function specified in the@fulfillmentActivity@intent
-- fulfills the intent, Amazon Lex conveys this statement to the user.
putIntentResponse_conclusionStatement :: Lens.Lens' PutIntentResponse (Prelude.Maybe Statement)
putIntentResponse_conclusionStatement :: Lens' PutIntentResponse (Maybe Statement)
putIntentResponse_conclusionStatement = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Maybe Statement
conclusionStatement :: Maybe Statement
$sel:conclusionStatement:PutIntentResponse' :: PutIntentResponse -> Maybe Statement
conclusionStatement} -> Maybe Statement
conclusionStatement) (\s :: PutIntentResponse
s@PutIntentResponse' {} Maybe Statement
a -> PutIntentResponse
s {$sel:conclusionStatement:PutIntentResponse' :: Maybe Statement
conclusionStatement = Maybe Statement
a} :: PutIntentResponse)

-- | If defined in the intent, Amazon Lex prompts the user to confirm the
-- intent before fulfilling it.
putIntentResponse_confirmationPrompt :: Lens.Lens' PutIntentResponse (Prelude.Maybe Prompt)
putIntentResponse_confirmationPrompt :: Lens' PutIntentResponse (Maybe Prompt)
putIntentResponse_confirmationPrompt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Maybe Prompt
confirmationPrompt :: Maybe Prompt
$sel:confirmationPrompt:PutIntentResponse' :: PutIntentResponse -> Maybe Prompt
confirmationPrompt} -> Maybe Prompt
confirmationPrompt) (\s :: PutIntentResponse
s@PutIntentResponse' {} Maybe Prompt
a -> PutIntentResponse
s {$sel:confirmationPrompt:PutIntentResponse' :: Maybe Prompt
confirmationPrompt = Maybe Prompt
a} :: PutIntentResponse)

-- | @True@ if a new version of the intent was created. If the
-- @createVersion@ field was not specified in the request, the
-- @createVersion@ field is set to false in the response.
putIntentResponse_createVersion :: Lens.Lens' PutIntentResponse (Prelude.Maybe Prelude.Bool)
putIntentResponse_createVersion :: Lens' PutIntentResponse (Maybe Bool)
putIntentResponse_createVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Maybe Bool
createVersion :: Maybe Bool
$sel:createVersion:PutIntentResponse' :: PutIntentResponse -> Maybe Bool
createVersion} -> Maybe Bool
createVersion) (\s :: PutIntentResponse
s@PutIntentResponse' {} Maybe Bool
a -> PutIntentResponse
s {$sel:createVersion:PutIntentResponse' :: Maybe Bool
createVersion = Maybe Bool
a} :: PutIntentResponse)

-- | The date that the intent was created.
putIntentResponse_createdDate :: Lens.Lens' PutIntentResponse (Prelude.Maybe Prelude.UTCTime)
putIntentResponse_createdDate :: Lens' PutIntentResponse (Maybe UTCTime)
putIntentResponse_createdDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:PutIntentResponse' :: PutIntentResponse -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: PutIntentResponse
s@PutIntentResponse' {} Maybe POSIX
a -> PutIntentResponse
s {$sel:createdDate:PutIntentResponse' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: PutIntentResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | A description of the intent.
putIntentResponse_description :: Lens.Lens' PutIntentResponse (Prelude.Maybe Prelude.Text)
putIntentResponse_description :: Lens' PutIntentResponse (Maybe Text)
putIntentResponse_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Maybe Text
description :: Maybe Text
$sel:description:PutIntentResponse' :: PutIntentResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: PutIntentResponse
s@PutIntentResponse' {} Maybe Text
a -> PutIntentResponse
s {$sel:description:PutIntentResponse' :: Maybe Text
description = Maybe Text
a} :: PutIntentResponse)

-- | If defined in the intent, Amazon Lex invokes this Lambda function for
-- each user input.
putIntentResponse_dialogCodeHook :: Lens.Lens' PutIntentResponse (Prelude.Maybe CodeHook)
putIntentResponse_dialogCodeHook :: Lens' PutIntentResponse (Maybe CodeHook)
putIntentResponse_dialogCodeHook = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Maybe CodeHook
dialogCodeHook :: Maybe CodeHook
$sel:dialogCodeHook:PutIntentResponse' :: PutIntentResponse -> Maybe CodeHook
dialogCodeHook} -> Maybe CodeHook
dialogCodeHook) (\s :: PutIntentResponse
s@PutIntentResponse' {} Maybe CodeHook
a -> PutIntentResponse
s {$sel:dialogCodeHook:PutIntentResponse' :: Maybe CodeHook
dialogCodeHook = Maybe CodeHook
a} :: PutIntentResponse)

-- | If defined in the intent, Amazon Lex uses this prompt to solicit
-- additional user activity after the intent is fulfilled.
putIntentResponse_followUpPrompt :: Lens.Lens' PutIntentResponse (Prelude.Maybe FollowUpPrompt)
putIntentResponse_followUpPrompt :: Lens' PutIntentResponse (Maybe FollowUpPrompt)
putIntentResponse_followUpPrompt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Maybe FollowUpPrompt
followUpPrompt :: Maybe FollowUpPrompt
$sel:followUpPrompt:PutIntentResponse' :: PutIntentResponse -> Maybe FollowUpPrompt
followUpPrompt} -> Maybe FollowUpPrompt
followUpPrompt) (\s :: PutIntentResponse
s@PutIntentResponse' {} Maybe FollowUpPrompt
a -> PutIntentResponse
s {$sel:followUpPrompt:PutIntentResponse' :: Maybe FollowUpPrompt
followUpPrompt = Maybe FollowUpPrompt
a} :: PutIntentResponse)

-- | If defined in the intent, Amazon Lex invokes this Lambda function to
-- fulfill the intent after the user provides all of the information
-- required by the intent.
putIntentResponse_fulfillmentActivity :: Lens.Lens' PutIntentResponse (Prelude.Maybe FulfillmentActivity)
putIntentResponse_fulfillmentActivity :: Lens' PutIntentResponse (Maybe FulfillmentActivity)
putIntentResponse_fulfillmentActivity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Maybe FulfillmentActivity
fulfillmentActivity :: Maybe FulfillmentActivity
$sel:fulfillmentActivity:PutIntentResponse' :: PutIntentResponse -> Maybe FulfillmentActivity
fulfillmentActivity} -> Maybe FulfillmentActivity
fulfillmentActivity) (\s :: PutIntentResponse
s@PutIntentResponse' {} Maybe FulfillmentActivity
a -> PutIntentResponse
s {$sel:fulfillmentActivity:PutIntentResponse' :: Maybe FulfillmentActivity
fulfillmentActivity = Maybe FulfillmentActivity
a} :: PutIntentResponse)

-- | An array of @InputContext@ objects that lists the contexts that must be
-- active for Amazon Lex to choose the intent in a conversation with the
-- user.
putIntentResponse_inputContexts :: Lens.Lens' PutIntentResponse (Prelude.Maybe [InputContext])
putIntentResponse_inputContexts :: Lens' PutIntentResponse (Maybe [InputContext])
putIntentResponse_inputContexts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Maybe [InputContext]
inputContexts :: Maybe [InputContext]
$sel:inputContexts:PutIntentResponse' :: PutIntentResponse -> Maybe [InputContext]
inputContexts} -> Maybe [InputContext]
inputContexts) (\s :: PutIntentResponse
s@PutIntentResponse' {} Maybe [InputContext]
a -> PutIntentResponse
s {$sel:inputContexts:PutIntentResponse' :: Maybe [InputContext]
inputContexts = Maybe [InputContext]
a} :: PutIntentResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Configuration information, if any, required to connect to an Amazon
-- Kendra index and use the @AMAZON.KendraSearchIntent@ intent.
putIntentResponse_kendraConfiguration :: Lens.Lens' PutIntentResponse (Prelude.Maybe KendraConfiguration)
putIntentResponse_kendraConfiguration :: Lens' PutIntentResponse (Maybe KendraConfiguration)
putIntentResponse_kendraConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Maybe KendraConfiguration
kendraConfiguration :: Maybe KendraConfiguration
$sel:kendraConfiguration:PutIntentResponse' :: PutIntentResponse -> Maybe KendraConfiguration
kendraConfiguration} -> Maybe KendraConfiguration
kendraConfiguration) (\s :: PutIntentResponse
s@PutIntentResponse' {} Maybe KendraConfiguration
a -> PutIntentResponse
s {$sel:kendraConfiguration:PutIntentResponse' :: Maybe KendraConfiguration
kendraConfiguration = Maybe KendraConfiguration
a} :: PutIntentResponse)

-- | The date that the intent was updated. When you create a resource, the
-- creation date and last update dates are the same.
putIntentResponse_lastUpdatedDate :: Lens.Lens' PutIntentResponse (Prelude.Maybe Prelude.UTCTime)
putIntentResponse_lastUpdatedDate :: Lens' PutIntentResponse (Maybe UTCTime)
putIntentResponse_lastUpdatedDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Maybe POSIX
lastUpdatedDate :: Maybe POSIX
$sel:lastUpdatedDate:PutIntentResponse' :: PutIntentResponse -> Maybe POSIX
lastUpdatedDate} -> Maybe POSIX
lastUpdatedDate) (\s :: PutIntentResponse
s@PutIntentResponse' {} Maybe POSIX
a -> PutIntentResponse
s {$sel:lastUpdatedDate:PutIntentResponse' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
a} :: PutIntentResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

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

-- | An array of @OutputContext@ objects that lists the contexts that the
-- intent activates when the intent is fulfilled.
putIntentResponse_outputContexts :: Lens.Lens' PutIntentResponse (Prelude.Maybe [OutputContext])
putIntentResponse_outputContexts :: Lens' PutIntentResponse (Maybe [OutputContext])
putIntentResponse_outputContexts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Maybe [OutputContext]
outputContexts :: Maybe [OutputContext]
$sel:outputContexts:PutIntentResponse' :: PutIntentResponse -> Maybe [OutputContext]
outputContexts} -> Maybe [OutputContext]
outputContexts) (\s :: PutIntentResponse
s@PutIntentResponse' {} Maybe [OutputContext]
a -> PutIntentResponse
s {$sel:outputContexts:PutIntentResponse' :: Maybe [OutputContext]
outputContexts = Maybe [OutputContext]
a} :: PutIntentResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A unique identifier for the built-in intent that this intent is based
-- on.
putIntentResponse_parentIntentSignature :: Lens.Lens' PutIntentResponse (Prelude.Maybe Prelude.Text)
putIntentResponse_parentIntentSignature :: Lens' PutIntentResponse (Maybe Text)
putIntentResponse_parentIntentSignature = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Maybe Text
parentIntentSignature :: Maybe Text
$sel:parentIntentSignature:PutIntentResponse' :: PutIntentResponse -> Maybe Text
parentIntentSignature} -> Maybe Text
parentIntentSignature) (\s :: PutIntentResponse
s@PutIntentResponse' {} Maybe Text
a -> PutIntentResponse
s {$sel:parentIntentSignature:PutIntentResponse' :: Maybe Text
parentIntentSignature = Maybe Text
a} :: PutIntentResponse)

-- | If the user answers \"no\" to the question defined in
-- @confirmationPrompt@ Amazon Lex responds with this statement to
-- acknowledge that the intent was canceled.
putIntentResponse_rejectionStatement :: Lens.Lens' PutIntentResponse (Prelude.Maybe Statement)
putIntentResponse_rejectionStatement :: Lens' PutIntentResponse (Maybe Statement)
putIntentResponse_rejectionStatement = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Maybe Statement
rejectionStatement :: Maybe Statement
$sel:rejectionStatement:PutIntentResponse' :: PutIntentResponse -> Maybe Statement
rejectionStatement} -> Maybe Statement
rejectionStatement) (\s :: PutIntentResponse
s@PutIntentResponse' {} Maybe Statement
a -> PutIntentResponse
s {$sel:rejectionStatement:PutIntentResponse' :: Maybe Statement
rejectionStatement = Maybe Statement
a} :: PutIntentResponse)

-- | An array of sample utterances that are configured for the intent.
putIntentResponse_sampleUtterances :: Lens.Lens' PutIntentResponse (Prelude.Maybe [Prelude.Text])
putIntentResponse_sampleUtterances :: Lens' PutIntentResponse (Maybe [Text])
putIntentResponse_sampleUtterances = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Maybe [Text]
sampleUtterances :: Maybe [Text]
$sel:sampleUtterances:PutIntentResponse' :: PutIntentResponse -> Maybe [Text]
sampleUtterances} -> Maybe [Text]
sampleUtterances) (\s :: PutIntentResponse
s@PutIntentResponse' {} Maybe [Text]
a -> PutIntentResponse
s {$sel:sampleUtterances:PutIntentResponse' :: Maybe [Text]
sampleUtterances = Maybe [Text]
a} :: PutIntentResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An array of intent slots that are configured for the intent.
putIntentResponse_slots :: Lens.Lens' PutIntentResponse (Prelude.Maybe [Slot])
putIntentResponse_slots :: Lens' PutIntentResponse (Maybe [Slot])
putIntentResponse_slots = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Maybe [Slot]
slots :: Maybe [Slot]
$sel:slots:PutIntentResponse' :: PutIntentResponse -> Maybe [Slot]
slots} -> Maybe [Slot]
slots) (\s :: PutIntentResponse
s@PutIntentResponse' {} Maybe [Slot]
a -> PutIntentResponse
s {$sel:slots:PutIntentResponse' :: Maybe [Slot]
slots = Maybe [Slot]
a} :: PutIntentResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The version of the intent. For a new intent, the version is always
-- @$LATEST@.
putIntentResponse_version :: Lens.Lens' PutIntentResponse (Prelude.Maybe Prelude.Text)
putIntentResponse_version :: Lens' PutIntentResponse (Maybe Text)
putIntentResponse_version = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Maybe Text
version :: Maybe Text
$sel:version:PutIntentResponse' :: PutIntentResponse -> Maybe Text
version} -> Maybe Text
version) (\s :: PutIntentResponse
s@PutIntentResponse' {} Maybe Text
a -> PutIntentResponse
s {$sel:version:PutIntentResponse' :: Maybe Text
version = Maybe Text
a} :: PutIntentResponse)

-- | The response's http status code.
putIntentResponse_httpStatus :: Lens.Lens' PutIntentResponse Prelude.Int
putIntentResponse_httpStatus :: Lens' PutIntentResponse Int
putIntentResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntentResponse' {Int
httpStatus :: Int
$sel:httpStatus:PutIntentResponse' :: PutIntentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PutIntentResponse
s@PutIntentResponse' {} Int
a -> PutIntentResponse
s {$sel:httpStatus:PutIntentResponse' :: Int
httpStatus = Int
a} :: PutIntentResponse)

instance Prelude.NFData PutIntentResponse where
  rnf :: PutIntentResponse -> ()
rnf PutIntentResponse' {Int
Maybe Bool
Maybe [Text]
Maybe [InputContext]
Maybe [OutputContext]
Maybe [Slot]
Maybe Text
Maybe POSIX
Maybe CodeHook
Maybe FulfillmentActivity
Maybe KendraConfiguration
Maybe Prompt
Maybe Statement
Maybe FollowUpPrompt
httpStatus :: Int
version :: Maybe Text
slots :: Maybe [Slot]
sampleUtterances :: Maybe [Text]
rejectionStatement :: Maybe Statement
parentIntentSignature :: Maybe Text
outputContexts :: Maybe [OutputContext]
name :: Maybe Text
lastUpdatedDate :: Maybe POSIX
kendraConfiguration :: Maybe KendraConfiguration
inputContexts :: Maybe [InputContext]
fulfillmentActivity :: Maybe FulfillmentActivity
followUpPrompt :: Maybe FollowUpPrompt
dialogCodeHook :: Maybe CodeHook
description :: Maybe Text
createdDate :: Maybe POSIX
createVersion :: Maybe Bool
confirmationPrompt :: Maybe Prompt
conclusionStatement :: Maybe Statement
checksum :: Maybe Text
$sel:httpStatus:PutIntentResponse' :: PutIntentResponse -> Int
$sel:version:PutIntentResponse' :: PutIntentResponse -> Maybe Text
$sel:slots:PutIntentResponse' :: PutIntentResponse -> Maybe [Slot]
$sel:sampleUtterances:PutIntentResponse' :: PutIntentResponse -> Maybe [Text]
$sel:rejectionStatement:PutIntentResponse' :: PutIntentResponse -> Maybe Statement
$sel:parentIntentSignature:PutIntentResponse' :: PutIntentResponse -> Maybe Text
$sel:outputContexts:PutIntentResponse' :: PutIntentResponse -> Maybe [OutputContext]
$sel:name:PutIntentResponse' :: PutIntentResponse -> Maybe Text
$sel:lastUpdatedDate:PutIntentResponse' :: PutIntentResponse -> Maybe POSIX
$sel:kendraConfiguration:PutIntentResponse' :: PutIntentResponse -> Maybe KendraConfiguration
$sel:inputContexts:PutIntentResponse' :: PutIntentResponse -> Maybe [InputContext]
$sel:fulfillmentActivity:PutIntentResponse' :: PutIntentResponse -> Maybe FulfillmentActivity
$sel:followUpPrompt:PutIntentResponse' :: PutIntentResponse -> Maybe FollowUpPrompt
$sel:dialogCodeHook:PutIntentResponse' :: PutIntentResponse -> Maybe CodeHook
$sel:description:PutIntentResponse' :: PutIntentResponse -> Maybe Text
$sel:createdDate:PutIntentResponse' :: PutIntentResponse -> Maybe POSIX
$sel:createVersion:PutIntentResponse' :: PutIntentResponse -> Maybe Bool
$sel:confirmationPrompt:PutIntentResponse' :: PutIntentResponse -> Maybe Prompt
$sel:conclusionStatement:PutIntentResponse' :: PutIntentResponse -> Maybe Statement
$sel:checksum:PutIntentResponse' :: PutIntentResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
checksum
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Statement
conclusionStatement
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Prompt
confirmationPrompt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
createVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CodeHook
dialogCodeHook
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FollowUpPrompt
followUpPrompt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FulfillmentActivity
fulfillmentActivity
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [InputContext]
inputContexts
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe KendraConfiguration
kendraConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdatedDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [OutputContext]
outputContexts
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
parentIntentSignature
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Statement
rejectionStatement
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
sampleUtterances
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Slot]
slots
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
version
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus