{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- 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_fulfillmentActivity,
    putIntent_slots,
    putIntent_rejectionStatement,
    putIntent_checksum,
    putIntent_conclusionStatement,
    putIntent_sampleUtterances,
    putIntent_parentIntentSignature,
    putIntent_kendraConfiguration,
    putIntent_inputContexts,
    putIntent_followUpPrompt,
    putIntent_outputContexts,
    putIntent_confirmationPrompt,
    putIntent_createVersion,
    putIntent_dialogCodeHook,
    putIntent_description,
    putIntent_name,

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

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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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'
  { -- | 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 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],
    -- | 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,
    -- | 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,
    -- | 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],
    -- | 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,
    -- | 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 @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],
    -- | 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,
    -- | 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],
    -- | 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,
    -- | 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,
    -- | A description of the intent.
    PutIntent -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | 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
(PutIntent -> PutIntent -> Bool)
-> (PutIntent -> PutIntent -> Bool) -> Eq PutIntent
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]
(Int -> ReadS PutIntent)
-> ReadS [PutIntent]
-> ReadPrec PutIntent
-> ReadPrec [PutIntent]
-> Read 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
(Int -> PutIntent -> ShowS)
-> (PutIntent -> String)
-> ([PutIntent] -> ShowS)
-> Show PutIntent
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. PutIntent -> Rep PutIntent x)
-> (forall x. Rep PutIntent x -> PutIntent) -> Generic PutIntent
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:
--
-- '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).
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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/.
--
-- '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>.
--
-- '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.
--
-- '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.
--
-- 'outputContexts', 'putIntent_outputContexts' - An array of @OutputContext@ objects that lists the contexts that the
-- intent activates when the intent is fulfilled.
--
-- '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@.
--
-- '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.
--
-- 'description', 'putIntent_description' - A description of the intent.
--
-- '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' :: Maybe FulfillmentActivity
-> Maybe [Slot]
-> Maybe Statement
-> Maybe Text
-> Maybe Statement
-> Maybe [Text]
-> Maybe Text
-> Maybe KendraConfiguration
-> Maybe [InputContext]
-> Maybe FollowUpPrompt
-> Maybe [OutputContext]
-> Maybe Prompt
-> Maybe Bool
-> Maybe CodeHook
-> Maybe Text
-> Text
-> PutIntent
PutIntent'
    { $sel:fulfillmentActivity:PutIntent' :: Maybe FulfillmentActivity
fulfillmentActivity = Maybe FulfillmentActivity
forall a. Maybe a
Prelude.Nothing,
      $sel:slots:PutIntent' :: Maybe [Slot]
slots = Maybe [Slot]
forall a. Maybe a
Prelude.Nothing,
      $sel:rejectionStatement:PutIntent' :: Maybe Statement
rejectionStatement = Maybe Statement
forall a. Maybe a
Prelude.Nothing,
      $sel:checksum:PutIntent' :: Maybe Text
checksum = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:conclusionStatement:PutIntent' :: Maybe Statement
conclusionStatement = Maybe Statement
forall a. Maybe a
Prelude.Nothing,
      $sel:sampleUtterances:PutIntent' :: Maybe [Text]
sampleUtterances = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:parentIntentSignature:PutIntent' :: Maybe Text
parentIntentSignature = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:kendraConfiguration:PutIntent' :: Maybe KendraConfiguration
kendraConfiguration = Maybe KendraConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:inputContexts:PutIntent' :: Maybe [InputContext]
inputContexts = Maybe [InputContext]
forall a. Maybe a
Prelude.Nothing,
      $sel:followUpPrompt:PutIntent' :: Maybe FollowUpPrompt
followUpPrompt = Maybe FollowUpPrompt
forall a. Maybe a
Prelude.Nothing,
      $sel:outputContexts:PutIntent' :: Maybe [OutputContext]
outputContexts = Maybe [OutputContext]
forall a. Maybe a
Prelude.Nothing,
      $sel:confirmationPrompt:PutIntent' :: Maybe Prompt
confirmationPrompt = Maybe Prompt
forall a. Maybe a
Prelude.Nothing,
      $sel:createVersion:PutIntent' :: Maybe Bool
createVersion = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:dialogCodeHook:PutIntent' :: Maybe CodeHook
dialogCodeHook = Maybe CodeHook
forall a. Maybe a
Prelude.Nothing,
      $sel:description:PutIntent' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:PutIntent' :: Text
name = Text
pName_
    }

-- | 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 :: (Maybe FulfillmentActivity -> f (Maybe FulfillmentActivity))
-> PutIntent -> f PutIntent
putIntent_fulfillmentActivity = (PutIntent -> Maybe FulfillmentActivity)
-> (PutIntent -> Maybe FulfillmentActivity -> PutIntent)
-> Lens
     PutIntent
     PutIntent
     (Maybe FulfillmentActivity)
     (Maybe 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 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 :: (Maybe [Slot] -> f (Maybe [Slot])) -> PutIntent -> f PutIntent
putIntent_slots = (PutIntent -> Maybe [Slot])
-> (PutIntent -> Maybe [Slot] -> PutIntent)
-> Lens PutIntent PutIntent (Maybe [Slot]) (Maybe [Slot])
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) ((Maybe [Slot] -> f (Maybe [Slot])) -> PutIntent -> f PutIntent)
-> ((Maybe [Slot] -> f (Maybe [Slot]))
    -> Maybe [Slot] -> f (Maybe [Slot]))
-> (Maybe [Slot] -> f (Maybe [Slot]))
-> PutIntent
-> f PutIntent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Slot] [Slot] [Slot] [Slot]
-> Iso (Maybe [Slot]) (Maybe [Slot]) (Maybe [Slot]) (Maybe [Slot])
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 AnIso [Slot] [Slot] [Slot] [Slot]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe Statement -> f (Maybe Statement))
-> PutIntent -> f PutIntent
putIntent_rejectionStatement = (PutIntent -> Maybe Statement)
-> (PutIntent -> Maybe Statement -> PutIntent)
-> Lens PutIntent PutIntent (Maybe Statement) (Maybe Statement)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> PutIntent -> f PutIntent
putIntent_checksum = (PutIntent -> Maybe Text)
-> (PutIntent -> Maybe Text -> PutIntent)
-> Lens PutIntent PutIntent (Maybe Text) (Maybe Text)
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 :: (Maybe Statement -> f (Maybe Statement))
-> PutIntent -> f PutIntent
putIntent_conclusionStatement = (PutIntent -> Maybe Statement)
-> (PutIntent -> Maybe Statement -> PutIntent)
-> Lens PutIntent PutIntent (Maybe Statement) (Maybe Statement)
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)

-- | 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 :: (Maybe [Text] -> f (Maybe [Text])) -> PutIntent -> f PutIntent
putIntent_sampleUtterances = (PutIntent -> Maybe [Text])
-> (PutIntent -> Maybe [Text] -> PutIntent)
-> Lens PutIntent PutIntent (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text])) -> PutIntent -> f PutIntent)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> PutIntent
-> f PutIntent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
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 :: (Maybe Text -> f (Maybe Text)) -> PutIntent -> f PutIntent
putIntent_parentIntentSignature = (PutIntent -> Maybe Text)
-> (PutIntent -> Maybe Text -> PutIntent)
-> Lens PutIntent PutIntent (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe KendraConfiguration -> f (Maybe KendraConfiguration))
-> PutIntent -> f PutIntent
putIntent_kendraConfiguration = (PutIntent -> Maybe KendraConfiguration)
-> (PutIntent -> Maybe KendraConfiguration -> PutIntent)
-> Lens
     PutIntent
     PutIntent
     (Maybe KendraConfiguration)
     (Maybe 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 @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 :: (Maybe [InputContext] -> f (Maybe [InputContext]))
-> PutIntent -> f PutIntent
putIntent_inputContexts = (PutIntent -> Maybe [InputContext])
-> (PutIntent -> Maybe [InputContext] -> PutIntent)
-> Lens
     PutIntent PutIntent (Maybe [InputContext]) (Maybe [InputContext])
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) ((Maybe [InputContext] -> f (Maybe [InputContext]))
 -> PutIntent -> f PutIntent)
-> ((Maybe [InputContext] -> f (Maybe [InputContext]))
    -> Maybe [InputContext] -> f (Maybe [InputContext]))
-> (Maybe [InputContext] -> f (Maybe [InputContext]))
-> PutIntent
-> f PutIntent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [InputContext] [InputContext] [InputContext] [InputContext]
-> Iso
     (Maybe [InputContext])
     (Maybe [InputContext])
     (Maybe [InputContext])
     (Maybe [InputContext])
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 AnIso [InputContext] [InputContext] [InputContext] [InputContext]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe FollowUpPrompt -> f (Maybe FollowUpPrompt))
-> PutIntent -> f PutIntent
putIntent_followUpPrompt = (PutIntent -> Maybe FollowUpPrompt)
-> (PutIntent -> Maybe FollowUpPrompt -> PutIntent)
-> Lens
     PutIntent PutIntent (Maybe FollowUpPrompt) (Maybe 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)

-- | 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 :: (Maybe [OutputContext] -> f (Maybe [OutputContext]))
-> PutIntent -> f PutIntent
putIntent_outputContexts = (PutIntent -> Maybe [OutputContext])
-> (PutIntent -> Maybe [OutputContext] -> PutIntent)
-> Lens
     PutIntent PutIntent (Maybe [OutputContext]) (Maybe [OutputContext])
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) ((Maybe [OutputContext] -> f (Maybe [OutputContext]))
 -> PutIntent -> f PutIntent)
-> ((Maybe [OutputContext] -> f (Maybe [OutputContext]))
    -> Maybe [OutputContext] -> f (Maybe [OutputContext]))
-> (Maybe [OutputContext] -> f (Maybe [OutputContext]))
-> PutIntent
-> f PutIntent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [OutputContext] [OutputContext] [OutputContext] [OutputContext]
-> Iso
     (Maybe [OutputContext])
     (Maybe [OutputContext])
     (Maybe [OutputContext])
     (Maybe [OutputContext])
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 AnIso
  [OutputContext] [OutputContext] [OutputContext] [OutputContext]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe Prompt -> f (Maybe Prompt)) -> PutIntent -> f PutIntent
putIntent_confirmationPrompt = (PutIntent -> Maybe Prompt)
-> (PutIntent -> Maybe Prompt -> PutIntent)
-> Lens PutIntent PutIntent (Maybe Prompt) (Maybe Prompt)
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 :: (Maybe Bool -> f (Maybe Bool)) -> PutIntent -> f PutIntent
putIntent_createVersion = (PutIntent -> Maybe Bool)
-> (PutIntent -> Maybe Bool -> PutIntent)
-> Lens PutIntent PutIntent (Maybe Bool) (Maybe Bool)
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)

-- | 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 :: (Maybe CodeHook -> f (Maybe CodeHook)) -> PutIntent -> f PutIntent
putIntent_dialogCodeHook = (PutIntent -> Maybe CodeHook)
-> (PutIntent -> Maybe CodeHook -> PutIntent)
-> Lens PutIntent PutIntent (Maybe CodeHook) (Maybe CodeHook)
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)

-- | A description of the intent.
putIntent_description :: Lens.Lens' PutIntent (Prelude.Maybe Prelude.Text)
putIntent_description :: (Maybe Text -> f (Maybe Text)) -> PutIntent -> f PutIntent
putIntent_description = (PutIntent -> Maybe Text)
-> (PutIntent -> Maybe Text -> PutIntent)
-> Lens PutIntent PutIntent (Maybe Text) (Maybe Text)
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)

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

instance Prelude.Hashable PutIntent

instance Prelude.NFData PutIntent

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

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

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

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

-- | /See:/ 'newPutIntentResponse' smart constructor.
data PutIntentResponse = 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 -> Maybe FulfillmentActivity
fulfillmentActivity :: Prelude.Maybe FulfillmentActivity,
    -- | An array of intent slots that are configured for the intent.
    PutIntentResponse -> Maybe [Slot]
slots :: Prelude.Maybe [Slot],
    -- | 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,
    -- | 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,
    -- | An array of sample utterances that are configured for the intent.
    PutIntentResponse -> Maybe [Text]
sampleUtterances :: Prelude.Maybe [Prelude.Text],
    -- | A unique identifier for the built-in intent that this intent is based
    -- on.
    PutIntentResponse -> Maybe Text
parentIntentSignature :: Prelude.Maybe Prelude.Text,
    -- | The date that the intent was created.
    PutIntentResponse -> Maybe POSIX
createdDate :: Prelude.Maybe Core.POSIX,
    -- | 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 name of the intent.
    PutIntentResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The version of the intent. For a new intent, the version is always
    -- @$LATEST@.
    PutIntentResponse -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | 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],
    -- | 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,
    -- | 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 Core.POSIX,
    -- | 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],
    -- | 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,
    -- | If defined in the intent, Amazon Lex invokes this Lambda function for
    -- each user input.
    PutIntentResponse -> Maybe CodeHook
dialogCodeHook :: Prelude.Maybe CodeHook,
    -- | A description of the intent.
    PutIntentResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    PutIntentResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (PutIntentResponse -> PutIntentResponse -> Bool
(PutIntentResponse -> PutIntentResponse -> Bool)
-> (PutIntentResponse -> PutIntentResponse -> Bool)
-> Eq PutIntentResponse
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]
(Int -> ReadS PutIntentResponse)
-> ReadS [PutIntentResponse]
-> ReadPrec PutIntentResponse
-> ReadPrec [PutIntentResponse]
-> Read 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
(Int -> PutIntentResponse -> ShowS)
-> (PutIntentResponse -> String)
-> ([PutIntentResponse] -> ShowS)
-> Show PutIntentResponse
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. PutIntentResponse -> Rep PutIntentResponse x)
-> (forall x. Rep PutIntentResponse x -> PutIntentResponse)
-> Generic PutIntentResponse
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:
--
-- '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.
--
-- 'slots', 'putIntentResponse_slots' - An array of intent slots that are configured for the intent.
--
-- '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.
--
-- '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.
--
-- 'sampleUtterances', 'putIntentResponse_sampleUtterances' - An array of sample utterances that are configured for the intent.
--
-- 'parentIntentSignature', 'putIntentResponse_parentIntentSignature' - A unique identifier for the built-in intent that this intent is based
-- on.
--
-- 'createdDate', 'putIntentResponse_createdDate' - The date that the intent was created.
--
-- 'kendraConfiguration', 'putIntentResponse_kendraConfiguration' - Configuration information, if any, required to connect to an Amazon
-- Kendra index and use the @AMAZON.KendraSearchIntent@ intent.
--
-- 'name', 'putIntentResponse_name' - The name of the intent.
--
-- 'version', 'putIntentResponse_version' - The version of the intent. For a new intent, the version is always
-- @$LATEST@.
--
-- '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.
--
-- 'followUpPrompt', 'putIntentResponse_followUpPrompt' - If defined in the intent, Amazon Lex uses this prompt to solicit
-- additional user activity after the intent is fulfilled.
--
-- '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.
--
-- 'outputContexts', 'putIntentResponse_outputContexts' - An array of @OutputContext@ objects that lists the contexts that the
-- intent activates when the intent is fulfilled.
--
-- '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.
--
-- 'dialogCodeHook', 'putIntentResponse_dialogCodeHook' - If defined in the intent, Amazon Lex invokes this Lambda function for
-- each user input.
--
-- 'description', 'putIntentResponse_description' - A description of the intent.
--
-- 'httpStatus', 'putIntentResponse_httpStatus' - The response's http status code.
newPutIntentResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutIntentResponse
newPutIntentResponse :: Int -> PutIntentResponse
newPutIntentResponse Int
pHttpStatus_ =
  PutIntentResponse' :: Maybe FulfillmentActivity
-> Maybe [Slot]
-> Maybe Statement
-> Maybe Text
-> Maybe Statement
-> Maybe [Text]
-> Maybe Text
-> Maybe POSIX
-> Maybe KendraConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe [InputContext]
-> Maybe FollowUpPrompt
-> Maybe POSIX
-> Maybe [OutputContext]
-> Maybe Prompt
-> Maybe Bool
-> Maybe CodeHook
-> Maybe Text
-> Int
-> PutIntentResponse
PutIntentResponse'
    { $sel:fulfillmentActivity:PutIntentResponse' :: Maybe FulfillmentActivity
fulfillmentActivity =
        Maybe FulfillmentActivity
forall a. Maybe a
Prelude.Nothing,
      $sel:slots:PutIntentResponse' :: Maybe [Slot]
slots = Maybe [Slot]
forall a. Maybe a
Prelude.Nothing,
      $sel:rejectionStatement:PutIntentResponse' :: Maybe Statement
rejectionStatement = Maybe Statement
forall a. Maybe a
Prelude.Nothing,
      $sel:checksum:PutIntentResponse' :: Maybe Text
checksum = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:conclusionStatement:PutIntentResponse' :: Maybe Statement
conclusionStatement = Maybe Statement
forall a. Maybe a
Prelude.Nothing,
      $sel:sampleUtterances:PutIntentResponse' :: Maybe [Text]
sampleUtterances = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:parentIntentSignature:PutIntentResponse' :: Maybe Text
parentIntentSignature = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:PutIntentResponse' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:kendraConfiguration:PutIntentResponse' :: Maybe KendraConfiguration
kendraConfiguration = Maybe KendraConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:name:PutIntentResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:PutIntentResponse' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:inputContexts:PutIntentResponse' :: Maybe [InputContext]
inputContexts = Maybe [InputContext]
forall a. Maybe a
Prelude.Nothing,
      $sel:followUpPrompt:PutIntentResponse' :: Maybe FollowUpPrompt
followUpPrompt = Maybe FollowUpPrompt
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDate:PutIntentResponse' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:outputContexts:PutIntentResponse' :: Maybe [OutputContext]
outputContexts = Maybe [OutputContext]
forall a. Maybe a
Prelude.Nothing,
      $sel:confirmationPrompt:PutIntentResponse' :: Maybe Prompt
confirmationPrompt = Maybe Prompt
forall a. Maybe a
Prelude.Nothing,
      $sel:createVersion:PutIntentResponse' :: Maybe Bool
createVersion = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:dialogCodeHook:PutIntentResponse' :: Maybe CodeHook
dialogCodeHook = Maybe CodeHook
forall a. Maybe a
Prelude.Nothing,
      $sel:description:PutIntentResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:PutIntentResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | 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 :: (Maybe FulfillmentActivity -> f (Maybe FulfillmentActivity))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_fulfillmentActivity = (PutIntentResponse -> Maybe FulfillmentActivity)
-> (PutIntentResponse
    -> Maybe FulfillmentActivity -> PutIntentResponse)
-> Lens
     PutIntentResponse
     PutIntentResponse
     (Maybe FulfillmentActivity)
     (Maybe 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 intent slots that are configured for the intent.
putIntentResponse_slots :: Lens.Lens' PutIntentResponse (Prelude.Maybe [Slot])
putIntentResponse_slots :: (Maybe [Slot] -> f (Maybe [Slot]))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_slots = (PutIntentResponse -> Maybe [Slot])
-> (PutIntentResponse -> Maybe [Slot] -> PutIntentResponse)
-> Lens
     PutIntentResponse PutIntentResponse (Maybe [Slot]) (Maybe [Slot])
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) ((Maybe [Slot] -> f (Maybe [Slot]))
 -> PutIntentResponse -> f PutIntentResponse)
-> ((Maybe [Slot] -> f (Maybe [Slot]))
    -> Maybe [Slot] -> f (Maybe [Slot]))
-> (Maybe [Slot] -> f (Maybe [Slot]))
-> PutIntentResponse
-> f PutIntentResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Slot] [Slot] [Slot] [Slot]
-> Iso (Maybe [Slot]) (Maybe [Slot]) (Maybe [Slot]) (Maybe [Slot])
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 AnIso [Slot] [Slot] [Slot] [Slot]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe Statement -> f (Maybe Statement))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_rejectionStatement = (PutIntentResponse -> Maybe Statement)
-> (PutIntentResponse -> Maybe Statement -> PutIntentResponse)
-> Lens
     PutIntentResponse
     PutIntentResponse
     (Maybe Statement)
     (Maybe Statement)
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)

-- | Checksum of the @$LATEST@version of the intent created or updated.
putIntentResponse_checksum :: Lens.Lens' PutIntentResponse (Prelude.Maybe Prelude.Text)
putIntentResponse_checksum :: (Maybe Text -> f (Maybe Text))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_checksum = (PutIntentResponse -> Maybe Text)
-> (PutIntentResponse -> Maybe Text -> PutIntentResponse)
-> Lens
     PutIntentResponse PutIntentResponse (Maybe Text) (Maybe Text)
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 :: (Maybe Statement -> f (Maybe Statement))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_conclusionStatement = (PutIntentResponse -> Maybe Statement)
-> (PutIntentResponse -> Maybe Statement -> PutIntentResponse)
-> Lens
     PutIntentResponse
     PutIntentResponse
     (Maybe Statement)
     (Maybe Statement)
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)

-- | An array of sample utterances that are configured for the intent.
putIntentResponse_sampleUtterances :: Lens.Lens' PutIntentResponse (Prelude.Maybe [Prelude.Text])
putIntentResponse_sampleUtterances :: (Maybe [Text] -> f (Maybe [Text]))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_sampleUtterances = (PutIntentResponse -> Maybe [Text])
-> (PutIntentResponse -> Maybe [Text] -> PutIntentResponse)
-> Lens
     PutIntentResponse PutIntentResponse (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> PutIntentResponse -> f PutIntentResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> PutIntentResponse
-> f PutIntentResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
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 :: (Maybe Text -> f (Maybe Text))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_parentIntentSignature = (PutIntentResponse -> Maybe Text)
-> (PutIntentResponse -> Maybe Text -> PutIntentResponse)
-> Lens
     PutIntentResponse PutIntentResponse (Maybe Text) (Maybe Text)
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)

-- | The date that the intent was created.
putIntentResponse_createdDate :: Lens.Lens' PutIntentResponse (Prelude.Maybe Prelude.UTCTime)
putIntentResponse_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_createdDate = (PutIntentResponse -> Maybe POSIX)
-> (PutIntentResponse -> Maybe POSIX -> PutIntentResponse)
-> Lens
     PutIntentResponse PutIntentResponse (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
 -> PutIntentResponse -> f PutIntentResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PutIntentResponse
-> f PutIntentResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | 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 :: (Maybe KendraConfiguration -> f (Maybe KendraConfiguration))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_kendraConfiguration = (PutIntentResponse -> Maybe KendraConfiguration)
-> (PutIntentResponse
    -> Maybe KendraConfiguration -> PutIntentResponse)
-> Lens
     PutIntentResponse
     PutIntentResponse
     (Maybe KendraConfiguration)
     (Maybe 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 name of the intent.
putIntentResponse_name :: Lens.Lens' PutIntentResponse (Prelude.Maybe Prelude.Text)
putIntentResponse_name :: (Maybe Text -> f (Maybe Text))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_name = (PutIntentResponse -> Maybe Text)
-> (PutIntentResponse -> Maybe Text -> PutIntentResponse)
-> Lens
     PutIntentResponse PutIntentResponse (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_version = (PutIntentResponse -> Maybe Text)
-> (PutIntentResponse -> Maybe Text -> PutIntentResponse)
-> Lens
     PutIntentResponse PutIntentResponse (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe [InputContext] -> f (Maybe [InputContext]))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_inputContexts = (PutIntentResponse -> Maybe [InputContext])
-> (PutIntentResponse -> Maybe [InputContext] -> PutIntentResponse)
-> Lens
     PutIntentResponse
     PutIntentResponse
     (Maybe [InputContext])
     (Maybe [InputContext])
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) ((Maybe [InputContext] -> f (Maybe [InputContext]))
 -> PutIntentResponse -> f PutIntentResponse)
-> ((Maybe [InputContext] -> f (Maybe [InputContext]))
    -> Maybe [InputContext] -> f (Maybe [InputContext]))
-> (Maybe [InputContext] -> f (Maybe [InputContext]))
-> PutIntentResponse
-> f PutIntentResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [InputContext] [InputContext] [InputContext] [InputContext]
-> Iso
     (Maybe [InputContext])
     (Maybe [InputContext])
     (Maybe [InputContext])
     (Maybe [InputContext])
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 AnIso [InputContext] [InputContext] [InputContext] [InputContext]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe FollowUpPrompt -> f (Maybe FollowUpPrompt))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_followUpPrompt = (PutIntentResponse -> Maybe FollowUpPrompt)
-> (PutIntentResponse -> Maybe FollowUpPrompt -> PutIntentResponse)
-> Lens
     PutIntentResponse
     PutIntentResponse
     (Maybe FollowUpPrompt)
     (Maybe 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)

-- | 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 :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_lastUpdatedDate = (PutIntentResponse -> Maybe POSIX)
-> (PutIntentResponse -> Maybe POSIX -> PutIntentResponse)
-> Lens
     PutIntentResponse PutIntentResponse (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
 -> PutIntentResponse -> f PutIntentResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PutIntentResponse
-> f PutIntentResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | 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 :: (Maybe [OutputContext] -> f (Maybe [OutputContext]))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_outputContexts = (PutIntentResponse -> Maybe [OutputContext])
-> (PutIntentResponse
    -> Maybe [OutputContext] -> PutIntentResponse)
-> Lens
     PutIntentResponse
     PutIntentResponse
     (Maybe [OutputContext])
     (Maybe [OutputContext])
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) ((Maybe [OutputContext] -> f (Maybe [OutputContext]))
 -> PutIntentResponse -> f PutIntentResponse)
-> ((Maybe [OutputContext] -> f (Maybe [OutputContext]))
    -> Maybe [OutputContext] -> f (Maybe [OutputContext]))
-> (Maybe [OutputContext] -> f (Maybe [OutputContext]))
-> PutIntentResponse
-> f PutIntentResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [OutputContext] [OutputContext] [OutputContext] [OutputContext]
-> Iso
     (Maybe [OutputContext])
     (Maybe [OutputContext])
     (Maybe [OutputContext])
     (Maybe [OutputContext])
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 AnIso
  [OutputContext] [OutputContext] [OutputContext] [OutputContext]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe Prompt -> f (Maybe Prompt))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_confirmationPrompt = (PutIntentResponse -> Maybe Prompt)
-> (PutIntentResponse -> Maybe Prompt -> PutIntentResponse)
-> Lens
     PutIntentResponse PutIntentResponse (Maybe Prompt) (Maybe Prompt)
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 :: (Maybe Bool -> f (Maybe Bool))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_createVersion = (PutIntentResponse -> Maybe Bool)
-> (PutIntentResponse -> Maybe Bool -> PutIntentResponse)
-> Lens
     PutIntentResponse PutIntentResponse (Maybe Bool) (Maybe Bool)
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)

-- | 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 :: (Maybe CodeHook -> f (Maybe CodeHook))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_dialogCodeHook = (PutIntentResponse -> Maybe CodeHook)
-> (PutIntentResponse -> Maybe CodeHook -> PutIntentResponse)
-> Lens
     PutIntentResponse
     PutIntentResponse
     (Maybe CodeHook)
     (Maybe CodeHook)
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)

-- | A description of the intent.
putIntentResponse_description :: Lens.Lens' PutIntentResponse (Prelude.Maybe Prelude.Text)
putIntentResponse_description :: (Maybe Text -> f (Maybe Text))
-> PutIntentResponse -> f PutIntentResponse
putIntentResponse_description = (PutIntentResponse -> Maybe Text)
-> (PutIntentResponse -> Maybe Text -> PutIntentResponse)
-> Lens
     PutIntentResponse PutIntentResponse (Maybe Text) (Maybe Text)
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)

-- | The response's http status code.
putIntentResponse_httpStatus :: Lens.Lens' PutIntentResponse Prelude.Int
putIntentResponse_httpStatus :: (Int -> f Int) -> PutIntentResponse -> f PutIntentResponse
putIntentResponse_httpStatus = (PutIntentResponse -> Int)
-> (PutIntentResponse -> Int -> PutIntentResponse)
-> Lens PutIntentResponse PutIntentResponse Int Int
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