{-# 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.PutBot
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates an Amazon Lex conversational bot or replaces an existing bot.
-- When you create or update a bot you are only required to specify a name,
-- a locale, and whether the bot is directed toward children under age 13.
-- You can use this to add intents later, or to remove intents from an
-- existing bot. When you create a bot with the minimum information, the
-- bot is created or updated but Amazon Lex returns the response @FAILED@.
-- You can build the bot after you add one or more intents. For more
-- information about Amazon Lex bots, see how-it-works.
--
-- If you specify the name of an existing bot, the fields in the request
-- replace the existing values in the @$LATEST@ version of the bot. Amazon
-- Lex removes any fields that you don\'t provide values for in the
-- request, except for the @idleTTLInSeconds@ and @privacySettings@ fields,
-- which are set to their default values. If you don\'t specify values for
-- required fields, Amazon Lex throws an exception.
--
-- This operation requires permissions for the @lex:PutBot@ action. For
-- more information, see security-iam.
module Amazonka.LexModels.PutBot
  ( -- * Creating a Request
    PutBot (..),
    newPutBot,

    -- * Request Lenses
    putBot_abortStatement,
    putBot_checksum,
    putBot_clarificationPrompt,
    putBot_createVersion,
    putBot_description,
    putBot_detectSentiment,
    putBot_enableModelImprovements,
    putBot_idleSessionTTLInSeconds,
    putBot_intents,
    putBot_nluIntentConfidenceThreshold,
    putBot_processBehavior,
    putBot_tags,
    putBot_voiceId,
    putBot_name,
    putBot_locale,
    putBot_childDirected,

    -- * Destructuring the Response
    PutBotResponse (..),
    newPutBotResponse,

    -- * Response Lenses
    putBotResponse_abortStatement,
    putBotResponse_checksum,
    putBotResponse_childDirected,
    putBotResponse_clarificationPrompt,
    putBotResponse_createVersion,
    putBotResponse_createdDate,
    putBotResponse_description,
    putBotResponse_detectSentiment,
    putBotResponse_enableModelImprovements,
    putBotResponse_failureReason,
    putBotResponse_idleSessionTTLInSeconds,
    putBotResponse_intents,
    putBotResponse_lastUpdatedDate,
    putBotResponse_locale,
    putBotResponse_name,
    putBotResponse_nluIntentConfidenceThreshold,
    putBotResponse_status,
    putBotResponse_tags,
    putBotResponse_version,
    putBotResponse_voiceId,
    putBotResponse_httpStatus,
  )
where

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

-- | /See:/ 'newPutBot' smart constructor.
data PutBot = PutBot'
  { -- | When Amazon Lex can\'t understand the user\'s input in context, it tries
    -- to elicit the information a few times. After that, Amazon Lex sends the
    -- message defined in @abortStatement@ to the user, and then cancels the
    -- conversation. To set the number of retries, use the
    -- @valueElicitationPrompt@ field for the slot type.
    --
    -- For example, in a pizza ordering bot, Amazon Lex might ask a user \"What
    -- type of crust would you like?\" If the user\'s response is not one of
    -- the expected responses (for example, \"thin crust, \"deep dish,\" etc.),
    -- Amazon Lex tries to elicit a correct response a few more times.
    --
    -- For example, in a pizza ordering application, @OrderPizza@ might be one
    -- of the intents. This intent might require the @CrustType@ slot. You
    -- specify the @valueElicitationPrompt@ field when you create the
    -- @CrustType@ slot.
    --
    -- If you have defined a fallback intent the cancel statement will not be
    -- sent to the user, the fallback intent is used instead. For more
    -- information, see
    -- <https://docs.aws.amazon.com/lex/latest/dg/built-in-intent-fallback.html AMAZON.FallbackIntent>.
    PutBot -> Maybe Statement
abortStatement :: Prelude.Maybe Statement,
    -- | Identifies a specific revision of the @$LATEST@ version.
    --
    -- When you create a new bot, leave the @checksum@ field blank. If you
    -- specify a checksum you get a @BadRequestException@ exception.
    --
    -- When you want to update a bot, 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.
    PutBot -> Maybe Text
checksum :: Prelude.Maybe Prelude.Text,
    -- | When Amazon Lex doesn\'t understand the user\'s intent, it uses this
    -- message to get clarification. To specify how many times Amazon Lex
    -- should repeat the clarification prompt, use the @maxAttempts@ field. If
    -- Amazon Lex still doesn\'t understand, it sends the message in the
    -- @abortStatement@ field.
    --
    -- When you create a clarification prompt, make sure that it suggests the
    -- correct response from the user. for example, for a bot that orders pizza
    -- and drinks, you might create this clarification prompt: \"What would you
    -- like to do? You can say \'Order a pizza\' or \'Order a drink.\'\"
    --
    -- If you have defined a fallback intent, it will be invoked if the
    -- clarification prompt is repeated the number of times defined in the
    -- @maxAttempts@ field. For more information, see
    -- <https://docs.aws.amazon.com/lex/latest/dg/built-in-intent-fallback.html AMAZON.FallbackIntent>.
    --
    -- If you don\'t define a clarification prompt, at runtime Amazon Lex will
    -- return a 400 Bad Request exception in three cases:
    --
    -- -   Follow-up prompt - When the user responds to a follow-up prompt but
    --     does not provide an intent. For example, in response to a follow-up
    --     prompt that says \"Would you like anything else today?\" the user
    --     says \"Yes.\" Amazon Lex will return a 400 Bad Request exception
    --     because it does not have a clarification prompt to send to the user
    --     to get an intent.
    --
    -- -   Lambda function - When using a Lambda function, you return an
    --     @ElicitIntent@ dialog type. Since Amazon Lex does not have a
    --     clarification prompt to get an intent from the user, it returns a
    --     400 Bad Request exception.
    --
    -- -   PutSession operation - When using the @PutSession@ operation, you
    --     send an @ElicitIntent@ dialog type. Since Amazon Lex does not have a
    --     clarification prompt to get an intent from the user, it returns a
    --     400 Bad Request exception.
    PutBot -> Maybe Prompt
clarificationPrompt :: Prelude.Maybe Prompt,
    -- | When set to @true@ a new numbered version of the bot is created. This is
    -- the same as calling the @CreateBotVersion@ operation. If you don\'t
    -- specify @createVersion@, the default is @false@.
    PutBot -> Maybe Bool
createVersion :: Prelude.Maybe Prelude.Bool,
    -- | A description of the bot.
    PutBot -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | When set to @true@ user utterances are sent to Amazon Comprehend for
    -- sentiment analysis. If you don\'t specify @detectSentiment@, the default
    -- is @false@.
    PutBot -> Maybe Bool
detectSentiment :: Prelude.Maybe Prelude.Bool,
    -- | Set to @true@ to enable access to natural language understanding
    -- improvements.
    --
    -- When you set the @enableModelImprovements@ parameter to @true@ you can
    -- use the @nluIntentConfidenceThreshold@ parameter to configure confidence
    -- scores. For more information, see
    -- <https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html Confidence Scores>.
    --
    -- You can only set the @enableModelImprovements@ parameter in certain
    -- Regions. If you set the parameter to @true@, your bot has access to
    -- accuracy improvements.
    --
    -- The Regions where you can set the @enableModelImprovements@ parameter to
    -- @true@ are:
    --
    -- -   US East (N. Virginia) (us-east-1)
    --
    -- -   US West (Oregon) (us-west-2)
    --
    -- -   Asia Pacific (Sydney) (ap-southeast-2)
    --
    -- -   EU (Ireland) (eu-west-1)
    --
    -- In other Regions, the @enableModelImprovements@ parameter is set to
    -- @true@ by default. In these Regions setting the parameter to @false@
    -- throws a @ValidationException@ exception.
    PutBot -> Maybe Bool
enableModelImprovements :: Prelude.Maybe Prelude.Bool,
    -- | The maximum time in seconds that Amazon Lex retains the data gathered in
    -- a conversation.
    --
    -- A user interaction session remains active for the amount of time
    -- specified. If no conversation occurs during this time, the session
    -- expires and Amazon Lex deletes any data provided before the timeout.
    --
    -- For example, suppose that a user chooses the OrderPizza intent, but gets
    -- sidetracked halfway through placing an order. If the user doesn\'t
    -- complete the order within the specified time, Amazon Lex discards the
    -- slot information that it gathered, and the user must start over.
    --
    -- If you don\'t include the @idleSessionTTLInSeconds@ element in a
    -- @PutBot@ operation request, Amazon Lex uses the default value. This is
    -- also true if the request replaces an existing bot.
    --
    -- The default is 300 seconds (5 minutes).
    PutBot -> Maybe Natural
idleSessionTTLInSeconds :: Prelude.Maybe Prelude.Natural,
    -- | An array of @Intent@ objects. Each intent represents a command that a
    -- user can express. For example, a pizza ordering bot might support an
    -- OrderPizza intent. For more information, see how-it-works.
    PutBot -> Maybe [Intent]
intents :: Prelude.Maybe [Intent],
    -- | Determines the threshold where Amazon Lex will insert the
    -- @AMAZON.FallbackIntent@, @AMAZON.KendraSearchIntent@, or both when
    -- returning alternative intents in a
    -- <https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostContent.html PostContent>
    -- or
    -- <https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html PostText>
    -- response. @AMAZON.FallbackIntent@ and @AMAZON.KendraSearchIntent@ are
    -- only inserted if they are configured for the bot.
    --
    -- You must set the @enableModelImprovements@ parameter to @true@ to use
    -- confidence scores in the following regions.
    --
    -- -   US East (N. Virginia) (us-east-1)
    --
    -- -   US West (Oregon) (us-west-2)
    --
    -- -   Asia Pacific (Sydney) (ap-southeast-2)
    --
    -- -   EU (Ireland) (eu-west-1)
    --
    -- In other Regions, the @enableModelImprovements@ parameter is set to
    -- @true@ by default.
    --
    -- For example, suppose a bot is configured with the confidence threshold
    -- of 0.80 and the @AMAZON.FallbackIntent@. Amazon Lex returns three
    -- alternative intents with the following confidence scores: IntentA
    -- (0.70), IntentB (0.60), IntentC (0.50). The response from the @PostText@
    -- operation would be:
    --
    -- -   AMAZON.FallbackIntent
    --
    -- -   IntentA
    --
    -- -   IntentB
    --
    -- -   IntentC
    PutBot -> Maybe Double
nluIntentConfidenceThreshold :: Prelude.Maybe Prelude.Double,
    -- | If you set the @processBehavior@ element to @BUILD@, Amazon Lex builds
    -- the bot so that it can be run. If you set the element to @SAVE@ Amazon
    -- Lex saves the bot, but doesn\'t build it.
    --
    -- If you don\'t specify this value, the default value is @BUILD@.
    PutBot -> Maybe ProcessBehavior
processBehavior :: Prelude.Maybe ProcessBehavior,
    -- | A list of tags to add to the bot. You can only add tags when you create
    -- a bot, you can\'t use the @PutBot@ operation to update the tags on a
    -- bot. To update tags, use the @TagResource@ operation.
    PutBot -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The Amazon Polly voice ID that you want Amazon Lex to use for voice
    -- interactions with the user. The locale configured for the voice must
    -- match the locale of the bot. For more information, see
    -- <https://docs.aws.amazon.com/polly/latest/dg/voicelist.html Voices in Amazon Polly>
    -- in the /Amazon Polly Developer Guide/.
    PutBot -> Maybe Text
voiceId :: Prelude.Maybe Prelude.Text,
    -- | The name of the bot. The name is /not/ case sensitive.
    PutBot -> Text
name :: Prelude.Text,
    -- | Specifies the target locale for the bot. Any intent used in the bot must
    -- be compatible with the locale of the bot.
    --
    -- The default is @en-US@.
    PutBot -> Locale
locale :: Locale,
    -- | For each Amazon Lex bot created with the Amazon Lex Model Building
    -- Service, you must specify whether your use of Amazon Lex is related to a
    -- website, program, or other application that is directed or targeted, in
    -- whole or in part, to children under age 13 and subject to the
    -- Children\'s Online Privacy Protection Act (COPPA) by specifying @true@
    -- or @false@ in the @childDirected@ field. By specifying @true@ in the
    -- @childDirected@ field, you confirm that your use of Amazon Lex __is__
    -- related to a website, program, or other application that is directed or
    -- targeted, in whole or in part, to children under age 13 and subject to
    -- COPPA. By specifying @false@ in the @childDirected@ field, you confirm
    -- that your use of Amazon Lex __is not__ related to a website, program, or
    -- other application that is directed or targeted, in whole or in part, to
    -- children under age 13 and subject to COPPA. You may not specify a
    -- default value for the @childDirected@ field that does not accurately
    -- reflect whether your use of Amazon Lex is related to a website, program,
    -- or other application that is directed or targeted, in whole or in part,
    -- to children under age 13 and subject to COPPA.
    --
    -- If your use of Amazon Lex relates to a website, program, or other
    -- application that is directed in whole or in part, to children under age
    -- 13, you must obtain any required verifiable parental consent under
    -- COPPA. For information regarding the use of Amazon Lex in connection
    -- with websites, programs, or other applications that are directed or
    -- targeted, in whole or in part, to children under age 13, see the
    -- <https://aws.amazon.com/lex/faqs#data-security Amazon Lex FAQ.>
    PutBot -> Bool
childDirected :: Prelude.Bool
  }
  deriving (PutBot -> PutBot -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutBot -> PutBot -> Bool
$c/= :: PutBot -> PutBot -> Bool
== :: PutBot -> PutBot -> Bool
$c== :: PutBot -> PutBot -> Bool
Prelude.Eq, ReadPrec [PutBot]
ReadPrec PutBot
Int -> ReadS PutBot
ReadS [PutBot]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutBot]
$creadListPrec :: ReadPrec [PutBot]
readPrec :: ReadPrec PutBot
$creadPrec :: ReadPrec PutBot
readList :: ReadS [PutBot]
$creadList :: ReadS [PutBot]
readsPrec :: Int -> ReadS PutBot
$creadsPrec :: Int -> ReadS PutBot
Prelude.Read, Int -> PutBot -> ShowS
[PutBot] -> ShowS
PutBot -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutBot] -> ShowS
$cshowList :: [PutBot] -> ShowS
show :: PutBot -> String
$cshow :: PutBot -> String
showsPrec :: Int -> PutBot -> ShowS
$cshowsPrec :: Int -> PutBot -> ShowS
Prelude.Show, forall x. Rep PutBot x -> PutBot
forall x. PutBot -> Rep PutBot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutBot x -> PutBot
$cfrom :: forall x. PutBot -> Rep PutBot x
Prelude.Generic)

-- |
-- Create a value of 'PutBot' 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:
--
-- 'abortStatement', 'putBot_abortStatement' - When Amazon Lex can\'t understand the user\'s input in context, it tries
-- to elicit the information a few times. After that, Amazon Lex sends the
-- message defined in @abortStatement@ to the user, and then cancels the
-- conversation. To set the number of retries, use the
-- @valueElicitationPrompt@ field for the slot type.
--
-- For example, in a pizza ordering bot, Amazon Lex might ask a user \"What
-- type of crust would you like?\" If the user\'s response is not one of
-- the expected responses (for example, \"thin crust, \"deep dish,\" etc.),
-- Amazon Lex tries to elicit a correct response a few more times.
--
-- For example, in a pizza ordering application, @OrderPizza@ might be one
-- of the intents. This intent might require the @CrustType@ slot. You
-- specify the @valueElicitationPrompt@ field when you create the
-- @CrustType@ slot.
--
-- If you have defined a fallback intent the cancel statement will not be
-- sent to the user, the fallback intent is used instead. For more
-- information, see
-- <https://docs.aws.amazon.com/lex/latest/dg/built-in-intent-fallback.html AMAZON.FallbackIntent>.
--
-- 'checksum', 'putBot_checksum' - Identifies a specific revision of the @$LATEST@ version.
--
-- When you create a new bot, leave the @checksum@ field blank. If you
-- specify a checksum you get a @BadRequestException@ exception.
--
-- When you want to update a bot, 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.
--
-- 'clarificationPrompt', 'putBot_clarificationPrompt' - When Amazon Lex doesn\'t understand the user\'s intent, it uses this
-- message to get clarification. To specify how many times Amazon Lex
-- should repeat the clarification prompt, use the @maxAttempts@ field. If
-- Amazon Lex still doesn\'t understand, it sends the message in the
-- @abortStatement@ field.
--
-- When you create a clarification prompt, make sure that it suggests the
-- correct response from the user. for example, for a bot that orders pizza
-- and drinks, you might create this clarification prompt: \"What would you
-- like to do? You can say \'Order a pizza\' or \'Order a drink.\'\"
--
-- If you have defined a fallback intent, it will be invoked if the
-- clarification prompt is repeated the number of times defined in the
-- @maxAttempts@ field. For more information, see
-- <https://docs.aws.amazon.com/lex/latest/dg/built-in-intent-fallback.html AMAZON.FallbackIntent>.
--
-- If you don\'t define a clarification prompt, at runtime Amazon Lex will
-- return a 400 Bad Request exception in three cases:
--
-- -   Follow-up prompt - When the user responds to a follow-up prompt but
--     does not provide an intent. For example, in response to a follow-up
--     prompt that says \"Would you like anything else today?\" the user
--     says \"Yes.\" Amazon Lex will return a 400 Bad Request exception
--     because it does not have a clarification prompt to send to the user
--     to get an intent.
--
-- -   Lambda function - When using a Lambda function, you return an
--     @ElicitIntent@ dialog type. Since Amazon Lex does not have a
--     clarification prompt to get an intent from the user, it returns a
--     400 Bad Request exception.
--
-- -   PutSession operation - When using the @PutSession@ operation, you
--     send an @ElicitIntent@ dialog type. Since Amazon Lex does not have a
--     clarification prompt to get an intent from the user, it returns a
--     400 Bad Request exception.
--
-- 'createVersion', 'putBot_createVersion' - When set to @true@ a new numbered version of the bot is created. This is
-- the same as calling the @CreateBotVersion@ operation. If you don\'t
-- specify @createVersion@, the default is @false@.
--
-- 'description', 'putBot_description' - A description of the bot.
--
-- 'detectSentiment', 'putBot_detectSentiment' - When set to @true@ user utterances are sent to Amazon Comprehend for
-- sentiment analysis. If you don\'t specify @detectSentiment@, the default
-- is @false@.
--
-- 'enableModelImprovements', 'putBot_enableModelImprovements' - Set to @true@ to enable access to natural language understanding
-- improvements.
--
-- When you set the @enableModelImprovements@ parameter to @true@ you can
-- use the @nluIntentConfidenceThreshold@ parameter to configure confidence
-- scores. For more information, see
-- <https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html Confidence Scores>.
--
-- You can only set the @enableModelImprovements@ parameter in certain
-- Regions. If you set the parameter to @true@, your bot has access to
-- accuracy improvements.
--
-- The Regions where you can set the @enableModelImprovements@ parameter to
-- @true@ are:
--
-- -   US East (N. Virginia) (us-east-1)
--
-- -   US West (Oregon) (us-west-2)
--
-- -   Asia Pacific (Sydney) (ap-southeast-2)
--
-- -   EU (Ireland) (eu-west-1)
--
-- In other Regions, the @enableModelImprovements@ parameter is set to
-- @true@ by default. In these Regions setting the parameter to @false@
-- throws a @ValidationException@ exception.
--
-- 'idleSessionTTLInSeconds', 'putBot_idleSessionTTLInSeconds' - The maximum time in seconds that Amazon Lex retains the data gathered in
-- a conversation.
--
-- A user interaction session remains active for the amount of time
-- specified. If no conversation occurs during this time, the session
-- expires and Amazon Lex deletes any data provided before the timeout.
--
-- For example, suppose that a user chooses the OrderPizza intent, but gets
-- sidetracked halfway through placing an order. If the user doesn\'t
-- complete the order within the specified time, Amazon Lex discards the
-- slot information that it gathered, and the user must start over.
--
-- If you don\'t include the @idleSessionTTLInSeconds@ element in a
-- @PutBot@ operation request, Amazon Lex uses the default value. This is
-- also true if the request replaces an existing bot.
--
-- The default is 300 seconds (5 minutes).
--
-- 'intents', 'putBot_intents' - An array of @Intent@ objects. Each intent represents a command that a
-- user can express. For example, a pizza ordering bot might support an
-- OrderPizza intent. For more information, see how-it-works.
--
-- 'nluIntentConfidenceThreshold', 'putBot_nluIntentConfidenceThreshold' - Determines the threshold where Amazon Lex will insert the
-- @AMAZON.FallbackIntent@, @AMAZON.KendraSearchIntent@, or both when
-- returning alternative intents in a
-- <https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostContent.html PostContent>
-- or
-- <https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html PostText>
-- response. @AMAZON.FallbackIntent@ and @AMAZON.KendraSearchIntent@ are
-- only inserted if they are configured for the bot.
--
-- You must set the @enableModelImprovements@ parameter to @true@ to use
-- confidence scores in the following regions.
--
-- -   US East (N. Virginia) (us-east-1)
--
-- -   US West (Oregon) (us-west-2)
--
-- -   Asia Pacific (Sydney) (ap-southeast-2)
--
-- -   EU (Ireland) (eu-west-1)
--
-- In other Regions, the @enableModelImprovements@ parameter is set to
-- @true@ by default.
--
-- For example, suppose a bot is configured with the confidence threshold
-- of 0.80 and the @AMAZON.FallbackIntent@. Amazon Lex returns three
-- alternative intents with the following confidence scores: IntentA
-- (0.70), IntentB (0.60), IntentC (0.50). The response from the @PostText@
-- operation would be:
--
-- -   AMAZON.FallbackIntent
--
-- -   IntentA
--
-- -   IntentB
--
-- -   IntentC
--
-- 'processBehavior', 'putBot_processBehavior' - If you set the @processBehavior@ element to @BUILD@, Amazon Lex builds
-- the bot so that it can be run. If you set the element to @SAVE@ Amazon
-- Lex saves the bot, but doesn\'t build it.
--
-- If you don\'t specify this value, the default value is @BUILD@.
--
-- 'tags', 'putBot_tags' - A list of tags to add to the bot. You can only add tags when you create
-- a bot, you can\'t use the @PutBot@ operation to update the tags on a
-- bot. To update tags, use the @TagResource@ operation.
--
-- 'voiceId', 'putBot_voiceId' - The Amazon Polly voice ID that you want Amazon Lex to use for voice
-- interactions with the user. The locale configured for the voice must
-- match the locale of the bot. For more information, see
-- <https://docs.aws.amazon.com/polly/latest/dg/voicelist.html Voices in Amazon Polly>
-- in the /Amazon Polly Developer Guide/.
--
-- 'name', 'putBot_name' - The name of the bot. The name is /not/ case sensitive.
--
-- 'locale', 'putBot_locale' - Specifies the target locale for the bot. Any intent used in the bot must
-- be compatible with the locale of the bot.
--
-- The default is @en-US@.
--
-- 'childDirected', 'putBot_childDirected' - For each Amazon Lex bot created with the Amazon Lex Model Building
-- Service, you must specify whether your use of Amazon Lex is related to a
-- website, program, or other application that is directed or targeted, in
-- whole or in part, to children under age 13 and subject to the
-- Children\'s Online Privacy Protection Act (COPPA) by specifying @true@
-- or @false@ in the @childDirected@ field. By specifying @true@ in the
-- @childDirected@ field, you confirm that your use of Amazon Lex __is__
-- related to a website, program, or other application that is directed or
-- targeted, in whole or in part, to children under age 13 and subject to
-- COPPA. By specifying @false@ in the @childDirected@ field, you confirm
-- that your use of Amazon Lex __is not__ related to a website, program, or
-- other application that is directed or targeted, in whole or in part, to
-- children under age 13 and subject to COPPA. You may not specify a
-- default value for the @childDirected@ field that does not accurately
-- reflect whether your use of Amazon Lex is related to a website, program,
-- or other application that is directed or targeted, in whole or in part,
-- to children under age 13 and subject to COPPA.
--
-- If your use of Amazon Lex relates to a website, program, or other
-- application that is directed in whole or in part, to children under age
-- 13, you must obtain any required verifiable parental consent under
-- COPPA. For information regarding the use of Amazon Lex in connection
-- with websites, programs, or other applications that are directed or
-- targeted, in whole or in part, to children under age 13, see the
-- <https://aws.amazon.com/lex/faqs#data-security Amazon Lex FAQ.>
newPutBot ::
  -- | 'name'
  Prelude.Text ->
  -- | 'locale'
  Locale ->
  -- | 'childDirected'
  Prelude.Bool ->
  PutBot
newPutBot :: Text -> Locale -> Bool -> PutBot
newPutBot Text
pName_ Locale
pLocale_ Bool
pChildDirected_ =
  PutBot'
    { $sel:abortStatement:PutBot' :: Maybe Statement
abortStatement = forall a. Maybe a
Prelude.Nothing,
      $sel:checksum:PutBot' :: Maybe Text
checksum = forall a. Maybe a
Prelude.Nothing,
      $sel:clarificationPrompt:PutBot' :: Maybe Prompt
clarificationPrompt = forall a. Maybe a
Prelude.Nothing,
      $sel:createVersion:PutBot' :: Maybe Bool
createVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:description:PutBot' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:detectSentiment:PutBot' :: Maybe Bool
detectSentiment = forall a. Maybe a
Prelude.Nothing,
      $sel:enableModelImprovements:PutBot' :: Maybe Bool
enableModelImprovements = forall a. Maybe a
Prelude.Nothing,
      $sel:idleSessionTTLInSeconds:PutBot' :: Maybe Natural
idleSessionTTLInSeconds = forall a. Maybe a
Prelude.Nothing,
      $sel:intents:PutBot' :: Maybe [Intent]
intents = forall a. Maybe a
Prelude.Nothing,
      $sel:nluIntentConfidenceThreshold:PutBot' :: Maybe Double
nluIntentConfidenceThreshold = forall a. Maybe a
Prelude.Nothing,
      $sel:processBehavior:PutBot' :: Maybe ProcessBehavior
processBehavior = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:PutBot' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:voiceId:PutBot' :: Maybe Text
voiceId = forall a. Maybe a
Prelude.Nothing,
      $sel:name:PutBot' :: Text
name = Text
pName_,
      $sel:locale:PutBot' :: Locale
locale = Locale
pLocale_,
      $sel:childDirected:PutBot' :: Bool
childDirected = Bool
pChildDirected_
    }

-- | When Amazon Lex can\'t understand the user\'s input in context, it tries
-- to elicit the information a few times. After that, Amazon Lex sends the
-- message defined in @abortStatement@ to the user, and then cancels the
-- conversation. To set the number of retries, use the
-- @valueElicitationPrompt@ field for the slot type.
--
-- For example, in a pizza ordering bot, Amazon Lex might ask a user \"What
-- type of crust would you like?\" If the user\'s response is not one of
-- the expected responses (for example, \"thin crust, \"deep dish,\" etc.),
-- Amazon Lex tries to elicit a correct response a few more times.
--
-- For example, in a pizza ordering application, @OrderPizza@ might be one
-- of the intents. This intent might require the @CrustType@ slot. You
-- specify the @valueElicitationPrompt@ field when you create the
-- @CrustType@ slot.
--
-- If you have defined a fallback intent the cancel statement will not be
-- sent to the user, the fallback intent is used instead. For more
-- information, see
-- <https://docs.aws.amazon.com/lex/latest/dg/built-in-intent-fallback.html AMAZON.FallbackIntent>.
putBot_abortStatement :: Lens.Lens' PutBot (Prelude.Maybe Statement)
putBot_abortStatement :: Lens' PutBot (Maybe Statement)
putBot_abortStatement = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBot' {Maybe Statement
abortStatement :: Maybe Statement
$sel:abortStatement:PutBot' :: PutBot -> Maybe Statement
abortStatement} -> Maybe Statement
abortStatement) (\s :: PutBot
s@PutBot' {} Maybe Statement
a -> PutBot
s {$sel:abortStatement:PutBot' :: Maybe Statement
abortStatement = Maybe Statement
a} :: PutBot)

-- | Identifies a specific revision of the @$LATEST@ version.
--
-- When you create a new bot, leave the @checksum@ field blank. If you
-- specify a checksum you get a @BadRequestException@ exception.
--
-- When you want to update a bot, 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.
putBot_checksum :: Lens.Lens' PutBot (Prelude.Maybe Prelude.Text)
putBot_checksum :: Lens' PutBot (Maybe Text)
putBot_checksum = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBot' {Maybe Text
checksum :: Maybe Text
$sel:checksum:PutBot' :: PutBot -> Maybe Text
checksum} -> Maybe Text
checksum) (\s :: PutBot
s@PutBot' {} Maybe Text
a -> PutBot
s {$sel:checksum:PutBot' :: Maybe Text
checksum = Maybe Text
a} :: PutBot)

-- | When Amazon Lex doesn\'t understand the user\'s intent, it uses this
-- message to get clarification. To specify how many times Amazon Lex
-- should repeat the clarification prompt, use the @maxAttempts@ field. If
-- Amazon Lex still doesn\'t understand, it sends the message in the
-- @abortStatement@ field.
--
-- When you create a clarification prompt, make sure that it suggests the
-- correct response from the user. for example, for a bot that orders pizza
-- and drinks, you might create this clarification prompt: \"What would you
-- like to do? You can say \'Order a pizza\' or \'Order a drink.\'\"
--
-- If you have defined a fallback intent, it will be invoked if the
-- clarification prompt is repeated the number of times defined in the
-- @maxAttempts@ field. For more information, see
-- <https://docs.aws.amazon.com/lex/latest/dg/built-in-intent-fallback.html AMAZON.FallbackIntent>.
--
-- If you don\'t define a clarification prompt, at runtime Amazon Lex will
-- return a 400 Bad Request exception in three cases:
--
-- -   Follow-up prompt - When the user responds to a follow-up prompt but
--     does not provide an intent. For example, in response to a follow-up
--     prompt that says \"Would you like anything else today?\" the user
--     says \"Yes.\" Amazon Lex will return a 400 Bad Request exception
--     because it does not have a clarification prompt to send to the user
--     to get an intent.
--
-- -   Lambda function - When using a Lambda function, you return an
--     @ElicitIntent@ dialog type. Since Amazon Lex does not have a
--     clarification prompt to get an intent from the user, it returns a
--     400 Bad Request exception.
--
-- -   PutSession operation - When using the @PutSession@ operation, you
--     send an @ElicitIntent@ dialog type. Since Amazon Lex does not have a
--     clarification prompt to get an intent from the user, it returns a
--     400 Bad Request exception.
putBot_clarificationPrompt :: Lens.Lens' PutBot (Prelude.Maybe Prompt)
putBot_clarificationPrompt :: Lens' PutBot (Maybe Prompt)
putBot_clarificationPrompt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBot' {Maybe Prompt
clarificationPrompt :: Maybe Prompt
$sel:clarificationPrompt:PutBot' :: PutBot -> Maybe Prompt
clarificationPrompt} -> Maybe Prompt
clarificationPrompt) (\s :: PutBot
s@PutBot' {} Maybe Prompt
a -> PutBot
s {$sel:clarificationPrompt:PutBot' :: Maybe Prompt
clarificationPrompt = Maybe Prompt
a} :: PutBot)

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

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

-- | When set to @true@ user utterances are sent to Amazon Comprehend for
-- sentiment analysis. If you don\'t specify @detectSentiment@, the default
-- is @false@.
putBot_detectSentiment :: Lens.Lens' PutBot (Prelude.Maybe Prelude.Bool)
putBot_detectSentiment :: Lens' PutBot (Maybe Bool)
putBot_detectSentiment = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBot' {Maybe Bool
detectSentiment :: Maybe Bool
$sel:detectSentiment:PutBot' :: PutBot -> Maybe Bool
detectSentiment} -> Maybe Bool
detectSentiment) (\s :: PutBot
s@PutBot' {} Maybe Bool
a -> PutBot
s {$sel:detectSentiment:PutBot' :: Maybe Bool
detectSentiment = Maybe Bool
a} :: PutBot)

-- | Set to @true@ to enable access to natural language understanding
-- improvements.
--
-- When you set the @enableModelImprovements@ parameter to @true@ you can
-- use the @nluIntentConfidenceThreshold@ parameter to configure confidence
-- scores. For more information, see
-- <https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html Confidence Scores>.
--
-- You can only set the @enableModelImprovements@ parameter in certain
-- Regions. If you set the parameter to @true@, your bot has access to
-- accuracy improvements.
--
-- The Regions where you can set the @enableModelImprovements@ parameter to
-- @true@ are:
--
-- -   US East (N. Virginia) (us-east-1)
--
-- -   US West (Oregon) (us-west-2)
--
-- -   Asia Pacific (Sydney) (ap-southeast-2)
--
-- -   EU (Ireland) (eu-west-1)
--
-- In other Regions, the @enableModelImprovements@ parameter is set to
-- @true@ by default. In these Regions setting the parameter to @false@
-- throws a @ValidationException@ exception.
putBot_enableModelImprovements :: Lens.Lens' PutBot (Prelude.Maybe Prelude.Bool)
putBot_enableModelImprovements :: Lens' PutBot (Maybe Bool)
putBot_enableModelImprovements = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBot' {Maybe Bool
enableModelImprovements :: Maybe Bool
$sel:enableModelImprovements:PutBot' :: PutBot -> Maybe Bool
enableModelImprovements} -> Maybe Bool
enableModelImprovements) (\s :: PutBot
s@PutBot' {} Maybe Bool
a -> PutBot
s {$sel:enableModelImprovements:PutBot' :: Maybe Bool
enableModelImprovements = Maybe Bool
a} :: PutBot)

-- | The maximum time in seconds that Amazon Lex retains the data gathered in
-- a conversation.
--
-- A user interaction session remains active for the amount of time
-- specified. If no conversation occurs during this time, the session
-- expires and Amazon Lex deletes any data provided before the timeout.
--
-- For example, suppose that a user chooses the OrderPizza intent, but gets
-- sidetracked halfway through placing an order. If the user doesn\'t
-- complete the order within the specified time, Amazon Lex discards the
-- slot information that it gathered, and the user must start over.
--
-- If you don\'t include the @idleSessionTTLInSeconds@ element in a
-- @PutBot@ operation request, Amazon Lex uses the default value. This is
-- also true if the request replaces an existing bot.
--
-- The default is 300 seconds (5 minutes).
putBot_idleSessionTTLInSeconds :: Lens.Lens' PutBot (Prelude.Maybe Prelude.Natural)
putBot_idleSessionTTLInSeconds :: Lens' PutBot (Maybe Natural)
putBot_idleSessionTTLInSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBot' {Maybe Natural
idleSessionTTLInSeconds :: Maybe Natural
$sel:idleSessionTTLInSeconds:PutBot' :: PutBot -> Maybe Natural
idleSessionTTLInSeconds} -> Maybe Natural
idleSessionTTLInSeconds) (\s :: PutBot
s@PutBot' {} Maybe Natural
a -> PutBot
s {$sel:idleSessionTTLInSeconds:PutBot' :: Maybe Natural
idleSessionTTLInSeconds = Maybe Natural
a} :: PutBot)

-- | An array of @Intent@ objects. Each intent represents a command that a
-- user can express. For example, a pizza ordering bot might support an
-- OrderPizza intent. For more information, see how-it-works.
putBot_intents :: Lens.Lens' PutBot (Prelude.Maybe [Intent])
putBot_intents :: Lens' PutBot (Maybe [Intent])
putBot_intents = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBot' {Maybe [Intent]
intents :: Maybe [Intent]
$sel:intents:PutBot' :: PutBot -> Maybe [Intent]
intents} -> Maybe [Intent]
intents) (\s :: PutBot
s@PutBot' {} Maybe [Intent]
a -> PutBot
s {$sel:intents:PutBot' :: Maybe [Intent]
intents = Maybe [Intent]
a} :: PutBot) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Determines the threshold where Amazon Lex will insert the
-- @AMAZON.FallbackIntent@, @AMAZON.KendraSearchIntent@, or both when
-- returning alternative intents in a
-- <https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostContent.html PostContent>
-- or
-- <https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html PostText>
-- response. @AMAZON.FallbackIntent@ and @AMAZON.KendraSearchIntent@ are
-- only inserted if they are configured for the bot.
--
-- You must set the @enableModelImprovements@ parameter to @true@ to use
-- confidence scores in the following regions.
--
-- -   US East (N. Virginia) (us-east-1)
--
-- -   US West (Oregon) (us-west-2)
--
-- -   Asia Pacific (Sydney) (ap-southeast-2)
--
-- -   EU (Ireland) (eu-west-1)
--
-- In other Regions, the @enableModelImprovements@ parameter is set to
-- @true@ by default.
--
-- For example, suppose a bot is configured with the confidence threshold
-- of 0.80 and the @AMAZON.FallbackIntent@. Amazon Lex returns three
-- alternative intents with the following confidence scores: IntentA
-- (0.70), IntentB (0.60), IntentC (0.50). The response from the @PostText@
-- operation would be:
--
-- -   AMAZON.FallbackIntent
--
-- -   IntentA
--
-- -   IntentB
--
-- -   IntentC
putBot_nluIntentConfidenceThreshold :: Lens.Lens' PutBot (Prelude.Maybe Prelude.Double)
putBot_nluIntentConfidenceThreshold :: Lens' PutBot (Maybe Double)
putBot_nluIntentConfidenceThreshold = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBot' {Maybe Double
nluIntentConfidenceThreshold :: Maybe Double
$sel:nluIntentConfidenceThreshold:PutBot' :: PutBot -> Maybe Double
nluIntentConfidenceThreshold} -> Maybe Double
nluIntentConfidenceThreshold) (\s :: PutBot
s@PutBot' {} Maybe Double
a -> PutBot
s {$sel:nluIntentConfidenceThreshold:PutBot' :: Maybe Double
nluIntentConfidenceThreshold = Maybe Double
a} :: PutBot)

-- | If you set the @processBehavior@ element to @BUILD@, Amazon Lex builds
-- the bot so that it can be run. If you set the element to @SAVE@ Amazon
-- Lex saves the bot, but doesn\'t build it.
--
-- If you don\'t specify this value, the default value is @BUILD@.
putBot_processBehavior :: Lens.Lens' PutBot (Prelude.Maybe ProcessBehavior)
putBot_processBehavior :: Lens' PutBot (Maybe ProcessBehavior)
putBot_processBehavior = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBot' {Maybe ProcessBehavior
processBehavior :: Maybe ProcessBehavior
$sel:processBehavior:PutBot' :: PutBot -> Maybe ProcessBehavior
processBehavior} -> Maybe ProcessBehavior
processBehavior) (\s :: PutBot
s@PutBot' {} Maybe ProcessBehavior
a -> PutBot
s {$sel:processBehavior:PutBot' :: Maybe ProcessBehavior
processBehavior = Maybe ProcessBehavior
a} :: PutBot)

-- | A list of tags to add to the bot. You can only add tags when you create
-- a bot, you can\'t use the @PutBot@ operation to update the tags on a
-- bot. To update tags, use the @TagResource@ operation.
putBot_tags :: Lens.Lens' PutBot (Prelude.Maybe [Tag])
putBot_tags :: Lens' PutBot (Maybe [Tag])
putBot_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBot' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:PutBot' :: PutBot -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: PutBot
s@PutBot' {} Maybe [Tag]
a -> PutBot
s {$sel:tags:PutBot' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: PutBot) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Polly voice ID that you want Amazon Lex to use for voice
-- interactions with the user. The locale configured for the voice must
-- match the locale of the bot. For more information, see
-- <https://docs.aws.amazon.com/polly/latest/dg/voicelist.html Voices in Amazon Polly>
-- in the /Amazon Polly Developer Guide/.
putBot_voiceId :: Lens.Lens' PutBot (Prelude.Maybe Prelude.Text)
putBot_voiceId :: Lens' PutBot (Maybe Text)
putBot_voiceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBot' {Maybe Text
voiceId :: Maybe Text
$sel:voiceId:PutBot' :: PutBot -> Maybe Text
voiceId} -> Maybe Text
voiceId) (\s :: PutBot
s@PutBot' {} Maybe Text
a -> PutBot
s {$sel:voiceId:PutBot' :: Maybe Text
voiceId = Maybe Text
a} :: PutBot)

-- | The name of the bot. The name is /not/ case sensitive.
putBot_name :: Lens.Lens' PutBot Prelude.Text
putBot_name :: Lens' PutBot Text
putBot_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBot' {Text
name :: Text
$sel:name:PutBot' :: PutBot -> Text
name} -> Text
name) (\s :: PutBot
s@PutBot' {} Text
a -> PutBot
s {$sel:name:PutBot' :: Text
name = Text
a} :: PutBot)

-- | Specifies the target locale for the bot. Any intent used in the bot must
-- be compatible with the locale of the bot.
--
-- The default is @en-US@.
putBot_locale :: Lens.Lens' PutBot Locale
putBot_locale :: Lens' PutBot Locale
putBot_locale = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBot' {Locale
locale :: Locale
$sel:locale:PutBot' :: PutBot -> Locale
locale} -> Locale
locale) (\s :: PutBot
s@PutBot' {} Locale
a -> PutBot
s {$sel:locale:PutBot' :: Locale
locale = Locale
a} :: PutBot)

-- | For each Amazon Lex bot created with the Amazon Lex Model Building
-- Service, you must specify whether your use of Amazon Lex is related to a
-- website, program, or other application that is directed or targeted, in
-- whole or in part, to children under age 13 and subject to the
-- Children\'s Online Privacy Protection Act (COPPA) by specifying @true@
-- or @false@ in the @childDirected@ field. By specifying @true@ in the
-- @childDirected@ field, you confirm that your use of Amazon Lex __is__
-- related to a website, program, or other application that is directed or
-- targeted, in whole or in part, to children under age 13 and subject to
-- COPPA. By specifying @false@ in the @childDirected@ field, you confirm
-- that your use of Amazon Lex __is not__ related to a website, program, or
-- other application that is directed or targeted, in whole or in part, to
-- children under age 13 and subject to COPPA. You may not specify a
-- default value for the @childDirected@ field that does not accurately
-- reflect whether your use of Amazon Lex is related to a website, program,
-- or other application that is directed or targeted, in whole or in part,
-- to children under age 13 and subject to COPPA.
--
-- If your use of Amazon Lex relates to a website, program, or other
-- application that is directed in whole or in part, to children under age
-- 13, you must obtain any required verifiable parental consent under
-- COPPA. For information regarding the use of Amazon Lex in connection
-- with websites, programs, or other applications that are directed or
-- targeted, in whole or in part, to children under age 13, see the
-- <https://aws.amazon.com/lex/faqs#data-security Amazon Lex FAQ.>
putBot_childDirected :: Lens.Lens' PutBot Prelude.Bool
putBot_childDirected :: Lens' PutBot Bool
putBot_childDirected = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBot' {Bool
childDirected :: Bool
$sel:childDirected:PutBot' :: PutBot -> Bool
childDirected} -> Bool
childDirected) (\s :: PutBot
s@PutBot' {} Bool
a -> PutBot
s {$sel:childDirected:PutBot' :: Bool
childDirected = Bool
a} :: PutBot)

instance Core.AWSRequest PutBot where
  type AWSResponse PutBot = PutBotResponse
  request :: (Service -> Service) -> PutBot -> Request PutBot
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy PutBot
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutBot)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Statement
-> Maybe Text
-> Maybe Bool
-> Maybe Prompt
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Natural
-> Maybe [Intent]
-> Maybe POSIX
-> Maybe Locale
-> Maybe Text
-> Maybe Double
-> Maybe LexStatus
-> Maybe [Tag]
-> Maybe Text
-> Maybe Text
-> Int
-> PutBotResponse
PutBotResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"abortStatement")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"checksum")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"childDirected")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"clarificationPrompt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"createVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"createdDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"detectSentiment")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"enableModelImprovements")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"failureReason")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"idleSessionTTLInSeconds")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"intents" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"lastUpdatedDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"locale")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nluIntentConfidenceThreshold")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"status")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"version")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"voiceId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable PutBot where
  hashWithSalt :: Int -> PutBot -> Int
hashWithSalt Int
_salt PutBot' {Bool
Maybe Bool
Maybe Double
Maybe Natural
Maybe [Intent]
Maybe [Tag]
Maybe Text
Maybe ProcessBehavior
Maybe Prompt
Maybe Statement
Text
Locale
childDirected :: Bool
locale :: Locale
name :: Text
voiceId :: Maybe Text
tags :: Maybe [Tag]
processBehavior :: Maybe ProcessBehavior
nluIntentConfidenceThreshold :: Maybe Double
intents :: Maybe [Intent]
idleSessionTTLInSeconds :: Maybe Natural
enableModelImprovements :: Maybe Bool
detectSentiment :: Maybe Bool
description :: Maybe Text
createVersion :: Maybe Bool
clarificationPrompt :: Maybe Prompt
checksum :: Maybe Text
abortStatement :: Maybe Statement
$sel:childDirected:PutBot' :: PutBot -> Bool
$sel:locale:PutBot' :: PutBot -> Locale
$sel:name:PutBot' :: PutBot -> Text
$sel:voiceId:PutBot' :: PutBot -> Maybe Text
$sel:tags:PutBot' :: PutBot -> Maybe [Tag]
$sel:processBehavior:PutBot' :: PutBot -> Maybe ProcessBehavior
$sel:nluIntentConfidenceThreshold:PutBot' :: PutBot -> Maybe Double
$sel:intents:PutBot' :: PutBot -> Maybe [Intent]
$sel:idleSessionTTLInSeconds:PutBot' :: PutBot -> Maybe Natural
$sel:enableModelImprovements:PutBot' :: PutBot -> Maybe Bool
$sel:detectSentiment:PutBot' :: PutBot -> Maybe Bool
$sel:description:PutBot' :: PutBot -> Maybe Text
$sel:createVersion:PutBot' :: PutBot -> Maybe Bool
$sel:clarificationPrompt:PutBot' :: PutBot -> Maybe Prompt
$sel:checksum:PutBot' :: PutBot -> Maybe Text
$sel:abortStatement:PutBot' :: PutBot -> Maybe Statement
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Statement
abortStatement
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
checksum
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Prompt
clarificationPrompt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
createVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
detectSentiment
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enableModelImprovements
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
idleSessionTTLInSeconds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Intent]
intents
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
nluIntentConfidenceThreshold
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProcessBehavior
processBehavior
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
voiceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Locale
locale
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
childDirected

instance Prelude.NFData PutBot where
  rnf :: PutBot -> ()
rnf PutBot' {Bool
Maybe Bool
Maybe Double
Maybe Natural
Maybe [Intent]
Maybe [Tag]
Maybe Text
Maybe ProcessBehavior
Maybe Prompt
Maybe Statement
Text
Locale
childDirected :: Bool
locale :: Locale
name :: Text
voiceId :: Maybe Text
tags :: Maybe [Tag]
processBehavior :: Maybe ProcessBehavior
nluIntentConfidenceThreshold :: Maybe Double
intents :: Maybe [Intent]
idleSessionTTLInSeconds :: Maybe Natural
enableModelImprovements :: Maybe Bool
detectSentiment :: Maybe Bool
description :: Maybe Text
createVersion :: Maybe Bool
clarificationPrompt :: Maybe Prompt
checksum :: Maybe Text
abortStatement :: Maybe Statement
$sel:childDirected:PutBot' :: PutBot -> Bool
$sel:locale:PutBot' :: PutBot -> Locale
$sel:name:PutBot' :: PutBot -> Text
$sel:voiceId:PutBot' :: PutBot -> Maybe Text
$sel:tags:PutBot' :: PutBot -> Maybe [Tag]
$sel:processBehavior:PutBot' :: PutBot -> Maybe ProcessBehavior
$sel:nluIntentConfidenceThreshold:PutBot' :: PutBot -> Maybe Double
$sel:intents:PutBot' :: PutBot -> Maybe [Intent]
$sel:idleSessionTTLInSeconds:PutBot' :: PutBot -> Maybe Natural
$sel:enableModelImprovements:PutBot' :: PutBot -> Maybe Bool
$sel:detectSentiment:PutBot' :: PutBot -> Maybe Bool
$sel:description:PutBot' :: PutBot -> Maybe Text
$sel:createVersion:PutBot' :: PutBot -> Maybe Bool
$sel:clarificationPrompt:PutBot' :: PutBot -> Maybe Prompt
$sel:checksum:PutBot' :: PutBot -> Maybe Text
$sel:abortStatement:PutBot' :: PutBot -> Maybe Statement
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Statement
abortStatement
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
checksum
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Prompt
clarificationPrompt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
createVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
detectSentiment
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enableModelImprovements
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
idleSessionTTLInSeconds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Intent]
intents
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
nluIntentConfidenceThreshold
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProcessBehavior
processBehavior
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
voiceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Locale
locale
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
childDirected

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

instance Data.ToJSON PutBot where
  toJSON :: PutBot -> Value
toJSON PutBot' {Bool
Maybe Bool
Maybe Double
Maybe Natural
Maybe [Intent]
Maybe [Tag]
Maybe Text
Maybe ProcessBehavior
Maybe Prompt
Maybe Statement
Text
Locale
childDirected :: Bool
locale :: Locale
name :: Text
voiceId :: Maybe Text
tags :: Maybe [Tag]
processBehavior :: Maybe ProcessBehavior
nluIntentConfidenceThreshold :: Maybe Double
intents :: Maybe [Intent]
idleSessionTTLInSeconds :: Maybe Natural
enableModelImprovements :: Maybe Bool
detectSentiment :: Maybe Bool
description :: Maybe Text
createVersion :: Maybe Bool
clarificationPrompt :: Maybe Prompt
checksum :: Maybe Text
abortStatement :: Maybe Statement
$sel:childDirected:PutBot' :: PutBot -> Bool
$sel:locale:PutBot' :: PutBot -> Locale
$sel:name:PutBot' :: PutBot -> Text
$sel:voiceId:PutBot' :: PutBot -> Maybe Text
$sel:tags:PutBot' :: PutBot -> Maybe [Tag]
$sel:processBehavior:PutBot' :: PutBot -> Maybe ProcessBehavior
$sel:nluIntentConfidenceThreshold:PutBot' :: PutBot -> Maybe Double
$sel:intents:PutBot' :: PutBot -> Maybe [Intent]
$sel:idleSessionTTLInSeconds:PutBot' :: PutBot -> Maybe Natural
$sel:enableModelImprovements:PutBot' :: PutBot -> Maybe Bool
$sel:detectSentiment:PutBot' :: PutBot -> Maybe Bool
$sel:description:PutBot' :: PutBot -> Maybe Text
$sel:createVersion:PutBot' :: PutBot -> Maybe Bool
$sel:clarificationPrompt:PutBot' :: PutBot -> Maybe Prompt
$sel:checksum:PutBot' :: PutBot -> Maybe Text
$sel:abortStatement:PutBot' :: PutBot -> Maybe Statement
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"abortStatement" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Statement
abortStatement,
            (Key
"checksum" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
checksum,
            (Key
"clarificationPrompt" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Prompt
clarificationPrompt,
            (Key
"createVersion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
createVersion,
            (Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Key
"detectSentiment" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
detectSentiment,
            (Key
"enableModelImprovements" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableModelImprovements,
            (Key
"idleSessionTTLInSeconds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
idleSessionTTLInSeconds,
            (Key
"intents" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Intent]
intents,
            (Key
"nluIntentConfidenceThreshold" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
nluIntentConfidenceThreshold,
            (Key
"processBehavior" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProcessBehavior
processBehavior,
            (Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            (Key
"voiceId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
voiceId,
            forall a. a -> Maybe a
Prelude.Just (Key
"locale" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Locale
locale),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"childDirected" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Bool
childDirected)
          ]
      )

instance Data.ToPath PutBot where
  toPath :: PutBot -> ByteString
toPath PutBot' {Bool
Maybe Bool
Maybe Double
Maybe Natural
Maybe [Intent]
Maybe [Tag]
Maybe Text
Maybe ProcessBehavior
Maybe Prompt
Maybe Statement
Text
Locale
childDirected :: Bool
locale :: Locale
name :: Text
voiceId :: Maybe Text
tags :: Maybe [Tag]
processBehavior :: Maybe ProcessBehavior
nluIntentConfidenceThreshold :: Maybe Double
intents :: Maybe [Intent]
idleSessionTTLInSeconds :: Maybe Natural
enableModelImprovements :: Maybe Bool
detectSentiment :: Maybe Bool
description :: Maybe Text
createVersion :: Maybe Bool
clarificationPrompt :: Maybe Prompt
checksum :: Maybe Text
abortStatement :: Maybe Statement
$sel:childDirected:PutBot' :: PutBot -> Bool
$sel:locale:PutBot' :: PutBot -> Locale
$sel:name:PutBot' :: PutBot -> Text
$sel:voiceId:PutBot' :: PutBot -> Maybe Text
$sel:tags:PutBot' :: PutBot -> Maybe [Tag]
$sel:processBehavior:PutBot' :: PutBot -> Maybe ProcessBehavior
$sel:nluIntentConfidenceThreshold:PutBot' :: PutBot -> Maybe Double
$sel:intents:PutBot' :: PutBot -> Maybe [Intent]
$sel:idleSessionTTLInSeconds:PutBot' :: PutBot -> Maybe Natural
$sel:enableModelImprovements:PutBot' :: PutBot -> Maybe Bool
$sel:detectSentiment:PutBot' :: PutBot -> Maybe Bool
$sel:description:PutBot' :: PutBot -> Maybe Text
$sel:createVersion:PutBot' :: PutBot -> Maybe Bool
$sel:clarificationPrompt:PutBot' :: PutBot -> Maybe Prompt
$sel:checksum:PutBot' :: PutBot -> Maybe Text
$sel:abortStatement:PutBot' :: PutBot -> Maybe Statement
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/bots/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
name, ByteString
"/versions/$LATEST"]

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

-- | /See:/ 'newPutBotResponse' smart constructor.
data PutBotResponse = PutBotResponse'
  { -- | The message that Amazon Lex uses to cancel a conversation. For more
    -- information, see PutBot.
    PutBotResponse -> Maybe Statement
abortStatement :: Prelude.Maybe Statement,
    -- | Checksum of the bot that you created.
    PutBotResponse -> Maybe Text
checksum :: Prelude.Maybe Prelude.Text,
    -- | For each Amazon Lex bot created with the Amazon Lex Model Building
    -- Service, you must specify whether your use of Amazon Lex is related to a
    -- website, program, or other application that is directed or targeted, in
    -- whole or in part, to children under age 13 and subject to the
    -- Children\'s Online Privacy Protection Act (COPPA) by specifying @true@
    -- or @false@ in the @childDirected@ field. By specifying @true@ in the
    -- @childDirected@ field, you confirm that your use of Amazon Lex __is__
    -- related to a website, program, or other application that is directed or
    -- targeted, in whole or in part, to children under age 13 and subject to
    -- COPPA. By specifying @false@ in the @childDirected@ field, you confirm
    -- that your use of Amazon Lex __is not__ related to a website, program, or
    -- other application that is directed or targeted, in whole or in part, to
    -- children under age 13 and subject to COPPA. You may not specify a
    -- default value for the @childDirected@ field that does not accurately
    -- reflect whether your use of Amazon Lex is related to a website, program,
    -- or other application that is directed or targeted, in whole or in part,
    -- to children under age 13 and subject to COPPA.
    --
    -- If your use of Amazon Lex relates to a website, program, or other
    -- application that is directed in whole or in part, to children under age
    -- 13, you must obtain any required verifiable parental consent under
    -- COPPA. For information regarding the use of Amazon Lex in connection
    -- with websites, programs, or other applications that are directed or
    -- targeted, in whole or in part, to children under age 13, see the
    -- <https://aws.amazon.com/lex/faqs#data-security Amazon Lex FAQ.>
    PutBotResponse -> Maybe Bool
childDirected :: Prelude.Maybe Prelude.Bool,
    -- | The prompts that Amazon Lex uses when it doesn\'t understand the user\'s
    -- intent. For more information, see PutBot.
    PutBotResponse -> Maybe Prompt
clarificationPrompt :: Prelude.Maybe Prompt,
    -- | @True@ if a new version of the bot was created. If the @createVersion@
    -- field was not specified in the request, the @createVersion@ field is set
    -- to false in the response.
    PutBotResponse -> Maybe Bool
createVersion :: Prelude.Maybe Prelude.Bool,
    -- | The date that the bot was created.
    PutBotResponse -> Maybe POSIX
createdDate :: Prelude.Maybe Data.POSIX,
    -- | A description of the bot.
    PutBotResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | @true@ if the bot is configured to send user utterances to Amazon
    -- Comprehend for sentiment analysis. If the @detectSentiment@ field was
    -- not specified in the request, the @detectSentiment@ field is @false@ in
    -- the response.
    PutBotResponse -> Maybe Bool
detectSentiment :: Prelude.Maybe Prelude.Bool,
    -- | Indicates whether the bot uses accuracy improvements. @true@ indicates
    -- that the bot is using the improvements, otherwise, @false@.
    PutBotResponse -> Maybe Bool
enableModelImprovements :: Prelude.Maybe Prelude.Bool,
    -- | If @status@ is @FAILED@, Amazon Lex provides the reason that it failed
    -- to build the bot.
    PutBotResponse -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | The maximum length of time that Amazon Lex retains the data gathered in
    -- a conversation. For more information, see PutBot.
    PutBotResponse -> Maybe Natural
idleSessionTTLInSeconds :: Prelude.Maybe Prelude.Natural,
    -- | An array of @Intent@ objects. For more information, see PutBot.
    PutBotResponse -> Maybe [Intent]
intents :: Prelude.Maybe [Intent],
    -- | The date that the bot was updated. When you create a resource, the
    -- creation date and last updated date are the same.
    PutBotResponse -> Maybe POSIX
lastUpdatedDate :: Prelude.Maybe Data.POSIX,
    -- | The target locale for the bot.
    PutBotResponse -> Maybe Locale
locale :: Prelude.Maybe Locale,
    -- | The name of the bot.
    PutBotResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The score that determines where Amazon Lex inserts the
    -- @AMAZON.FallbackIntent@, @AMAZON.KendraSearchIntent@, or both when
    -- returning alternative intents in a
    -- <https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostContent.html PostContent>
    -- or
    -- <https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html PostText>
    -- response. @AMAZON.FallbackIntent@ is inserted if the confidence score
    -- for all intents is below this value. @AMAZON.KendraSearchIntent@ is only
    -- inserted if it is configured for the bot.
    PutBotResponse -> Maybe Double
nluIntentConfidenceThreshold :: Prelude.Maybe Prelude.Double,
    -- | When you send a request to create a bot with @processBehavior@ set to
    -- @BUILD@, Amazon Lex sets the @status@ response element to @BUILDING@.
    --
    -- In the @READY_BASIC_TESTING@ state you can test the bot with user inputs
    -- that exactly match the utterances configured for the bot\'s intents and
    -- values in the slot types.
    --
    -- If Amazon Lex can\'t build the bot, Amazon Lex sets @status@ to
    -- @FAILED@. Amazon Lex returns the reason for the failure in the
    -- @failureReason@ response element.
    --
    -- When you set @processBehavior@ to @SAVE@, Amazon Lex sets the status
    -- code to @NOT BUILT@.
    --
    -- When the bot is in the @READY@ state you can test and publish the bot.
    PutBotResponse -> Maybe LexStatus
status :: Prelude.Maybe LexStatus,
    -- | A list of tags associated with the bot.
    PutBotResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The version of the bot. For a new bot, the version is always @$LATEST@.
    PutBotResponse -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Polly voice ID that Amazon Lex uses for voice interaction
    -- with the user. For more information, see PutBot.
    PutBotResponse -> Maybe Text
voiceId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    PutBotResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (PutBotResponse -> PutBotResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutBotResponse -> PutBotResponse -> Bool
$c/= :: PutBotResponse -> PutBotResponse -> Bool
== :: PutBotResponse -> PutBotResponse -> Bool
$c== :: PutBotResponse -> PutBotResponse -> Bool
Prelude.Eq, ReadPrec [PutBotResponse]
ReadPrec PutBotResponse
Int -> ReadS PutBotResponse
ReadS [PutBotResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutBotResponse]
$creadListPrec :: ReadPrec [PutBotResponse]
readPrec :: ReadPrec PutBotResponse
$creadPrec :: ReadPrec PutBotResponse
readList :: ReadS [PutBotResponse]
$creadList :: ReadS [PutBotResponse]
readsPrec :: Int -> ReadS PutBotResponse
$creadsPrec :: Int -> ReadS PutBotResponse
Prelude.Read, Int -> PutBotResponse -> ShowS
[PutBotResponse] -> ShowS
PutBotResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutBotResponse] -> ShowS
$cshowList :: [PutBotResponse] -> ShowS
show :: PutBotResponse -> String
$cshow :: PutBotResponse -> String
showsPrec :: Int -> PutBotResponse -> ShowS
$cshowsPrec :: Int -> PutBotResponse -> ShowS
Prelude.Show, forall x. Rep PutBotResponse x -> PutBotResponse
forall x. PutBotResponse -> Rep PutBotResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutBotResponse x -> PutBotResponse
$cfrom :: forall x. PutBotResponse -> Rep PutBotResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutBotResponse' 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:
--
-- 'abortStatement', 'putBotResponse_abortStatement' - The message that Amazon Lex uses to cancel a conversation. For more
-- information, see PutBot.
--
-- 'checksum', 'putBotResponse_checksum' - Checksum of the bot that you created.
--
-- 'childDirected', 'putBotResponse_childDirected' - For each Amazon Lex bot created with the Amazon Lex Model Building
-- Service, you must specify whether your use of Amazon Lex is related to a
-- website, program, or other application that is directed or targeted, in
-- whole or in part, to children under age 13 and subject to the
-- Children\'s Online Privacy Protection Act (COPPA) by specifying @true@
-- or @false@ in the @childDirected@ field. By specifying @true@ in the
-- @childDirected@ field, you confirm that your use of Amazon Lex __is__
-- related to a website, program, or other application that is directed or
-- targeted, in whole or in part, to children under age 13 and subject to
-- COPPA. By specifying @false@ in the @childDirected@ field, you confirm
-- that your use of Amazon Lex __is not__ related to a website, program, or
-- other application that is directed or targeted, in whole or in part, to
-- children under age 13 and subject to COPPA. You may not specify a
-- default value for the @childDirected@ field that does not accurately
-- reflect whether your use of Amazon Lex is related to a website, program,
-- or other application that is directed or targeted, in whole or in part,
-- to children under age 13 and subject to COPPA.
--
-- If your use of Amazon Lex relates to a website, program, or other
-- application that is directed in whole or in part, to children under age
-- 13, you must obtain any required verifiable parental consent under
-- COPPA. For information regarding the use of Amazon Lex in connection
-- with websites, programs, or other applications that are directed or
-- targeted, in whole or in part, to children under age 13, see the
-- <https://aws.amazon.com/lex/faqs#data-security Amazon Lex FAQ.>
--
-- 'clarificationPrompt', 'putBotResponse_clarificationPrompt' - The prompts that Amazon Lex uses when it doesn\'t understand the user\'s
-- intent. For more information, see PutBot.
--
-- 'createVersion', 'putBotResponse_createVersion' - @True@ if a new version of the bot was created. If the @createVersion@
-- field was not specified in the request, the @createVersion@ field is set
-- to false in the response.
--
-- 'createdDate', 'putBotResponse_createdDate' - The date that the bot was created.
--
-- 'description', 'putBotResponse_description' - A description of the bot.
--
-- 'detectSentiment', 'putBotResponse_detectSentiment' - @true@ if the bot is configured to send user utterances to Amazon
-- Comprehend for sentiment analysis. If the @detectSentiment@ field was
-- not specified in the request, the @detectSentiment@ field is @false@ in
-- the response.
--
-- 'enableModelImprovements', 'putBotResponse_enableModelImprovements' - Indicates whether the bot uses accuracy improvements. @true@ indicates
-- that the bot is using the improvements, otherwise, @false@.
--
-- 'failureReason', 'putBotResponse_failureReason' - If @status@ is @FAILED@, Amazon Lex provides the reason that it failed
-- to build the bot.
--
-- 'idleSessionTTLInSeconds', 'putBotResponse_idleSessionTTLInSeconds' - The maximum length of time that Amazon Lex retains the data gathered in
-- a conversation. For more information, see PutBot.
--
-- 'intents', 'putBotResponse_intents' - An array of @Intent@ objects. For more information, see PutBot.
--
-- 'lastUpdatedDate', 'putBotResponse_lastUpdatedDate' - The date that the bot was updated. When you create a resource, the
-- creation date and last updated date are the same.
--
-- 'locale', 'putBotResponse_locale' - The target locale for the bot.
--
-- 'name', 'putBotResponse_name' - The name of the bot.
--
-- 'nluIntentConfidenceThreshold', 'putBotResponse_nluIntentConfidenceThreshold' - The score that determines where Amazon Lex inserts the
-- @AMAZON.FallbackIntent@, @AMAZON.KendraSearchIntent@, or both when
-- returning alternative intents in a
-- <https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostContent.html PostContent>
-- or
-- <https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html PostText>
-- response. @AMAZON.FallbackIntent@ is inserted if the confidence score
-- for all intents is below this value. @AMAZON.KendraSearchIntent@ is only
-- inserted if it is configured for the bot.
--
-- 'status', 'putBotResponse_status' - When you send a request to create a bot with @processBehavior@ set to
-- @BUILD@, Amazon Lex sets the @status@ response element to @BUILDING@.
--
-- In the @READY_BASIC_TESTING@ state you can test the bot with user inputs
-- that exactly match the utterances configured for the bot\'s intents and
-- values in the slot types.
--
-- If Amazon Lex can\'t build the bot, Amazon Lex sets @status@ to
-- @FAILED@. Amazon Lex returns the reason for the failure in the
-- @failureReason@ response element.
--
-- When you set @processBehavior@ to @SAVE@, Amazon Lex sets the status
-- code to @NOT BUILT@.
--
-- When the bot is in the @READY@ state you can test and publish the bot.
--
-- 'tags', 'putBotResponse_tags' - A list of tags associated with the bot.
--
-- 'version', 'putBotResponse_version' - The version of the bot. For a new bot, the version is always @$LATEST@.
--
-- 'voiceId', 'putBotResponse_voiceId' - The Amazon Polly voice ID that Amazon Lex uses for voice interaction
-- with the user. For more information, see PutBot.
--
-- 'httpStatus', 'putBotResponse_httpStatus' - The response's http status code.
newPutBotResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutBotResponse
newPutBotResponse :: Int -> PutBotResponse
newPutBotResponse Int
pHttpStatus_ =
  PutBotResponse'
    { $sel:abortStatement:PutBotResponse' :: Maybe Statement
abortStatement = forall a. Maybe a
Prelude.Nothing,
      $sel:checksum:PutBotResponse' :: Maybe Text
checksum = forall a. Maybe a
Prelude.Nothing,
      $sel:childDirected:PutBotResponse' :: Maybe Bool
childDirected = forall a. Maybe a
Prelude.Nothing,
      $sel:clarificationPrompt:PutBotResponse' :: Maybe Prompt
clarificationPrompt = forall a. Maybe a
Prelude.Nothing,
      $sel:createVersion:PutBotResponse' :: Maybe Bool
createVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:PutBotResponse' :: Maybe POSIX
createdDate = forall a. Maybe a
Prelude.Nothing,
      $sel:description:PutBotResponse' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:detectSentiment:PutBotResponse' :: Maybe Bool
detectSentiment = forall a. Maybe a
Prelude.Nothing,
      $sel:enableModelImprovements:PutBotResponse' :: Maybe Bool
enableModelImprovements = forall a. Maybe a
Prelude.Nothing,
      $sel:failureReason:PutBotResponse' :: Maybe Text
failureReason = forall a. Maybe a
Prelude.Nothing,
      $sel:idleSessionTTLInSeconds:PutBotResponse' :: Maybe Natural
idleSessionTTLInSeconds = forall a. Maybe a
Prelude.Nothing,
      $sel:intents:PutBotResponse' :: Maybe [Intent]
intents = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDate:PutBotResponse' :: Maybe POSIX
lastUpdatedDate = forall a. Maybe a
Prelude.Nothing,
      $sel:locale:PutBotResponse' :: Maybe Locale
locale = forall a. Maybe a
Prelude.Nothing,
      $sel:name:PutBotResponse' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:nluIntentConfidenceThreshold:PutBotResponse' :: Maybe Double
nluIntentConfidenceThreshold = forall a. Maybe a
Prelude.Nothing,
      $sel:status:PutBotResponse' :: Maybe LexStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:PutBotResponse' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:version:PutBotResponse' :: Maybe Text
version = forall a. Maybe a
Prelude.Nothing,
      $sel:voiceId:PutBotResponse' :: Maybe Text
voiceId = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:PutBotResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The message that Amazon Lex uses to cancel a conversation. For more
-- information, see PutBot.
putBotResponse_abortStatement :: Lens.Lens' PutBotResponse (Prelude.Maybe Statement)
putBotResponse_abortStatement :: Lens' PutBotResponse (Maybe Statement)
putBotResponse_abortStatement = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotResponse' {Maybe Statement
abortStatement :: Maybe Statement
$sel:abortStatement:PutBotResponse' :: PutBotResponse -> Maybe Statement
abortStatement} -> Maybe Statement
abortStatement) (\s :: PutBotResponse
s@PutBotResponse' {} Maybe Statement
a -> PutBotResponse
s {$sel:abortStatement:PutBotResponse' :: Maybe Statement
abortStatement = Maybe Statement
a} :: PutBotResponse)

-- | Checksum of the bot that you created.
putBotResponse_checksum :: Lens.Lens' PutBotResponse (Prelude.Maybe Prelude.Text)
putBotResponse_checksum :: Lens' PutBotResponse (Maybe Text)
putBotResponse_checksum = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotResponse' {Maybe Text
checksum :: Maybe Text
$sel:checksum:PutBotResponse' :: PutBotResponse -> Maybe Text
checksum} -> Maybe Text
checksum) (\s :: PutBotResponse
s@PutBotResponse' {} Maybe Text
a -> PutBotResponse
s {$sel:checksum:PutBotResponse' :: Maybe Text
checksum = Maybe Text
a} :: PutBotResponse)

-- | For each Amazon Lex bot created with the Amazon Lex Model Building
-- Service, you must specify whether your use of Amazon Lex is related to a
-- website, program, or other application that is directed or targeted, in
-- whole or in part, to children under age 13 and subject to the
-- Children\'s Online Privacy Protection Act (COPPA) by specifying @true@
-- or @false@ in the @childDirected@ field. By specifying @true@ in the
-- @childDirected@ field, you confirm that your use of Amazon Lex __is__
-- related to a website, program, or other application that is directed or
-- targeted, in whole or in part, to children under age 13 and subject to
-- COPPA. By specifying @false@ in the @childDirected@ field, you confirm
-- that your use of Amazon Lex __is not__ related to a website, program, or
-- other application that is directed or targeted, in whole or in part, to
-- children under age 13 and subject to COPPA. You may not specify a
-- default value for the @childDirected@ field that does not accurately
-- reflect whether your use of Amazon Lex is related to a website, program,
-- or other application that is directed or targeted, in whole or in part,
-- to children under age 13 and subject to COPPA.
--
-- If your use of Amazon Lex relates to a website, program, or other
-- application that is directed in whole or in part, to children under age
-- 13, you must obtain any required verifiable parental consent under
-- COPPA. For information regarding the use of Amazon Lex in connection
-- with websites, programs, or other applications that are directed or
-- targeted, in whole or in part, to children under age 13, see the
-- <https://aws.amazon.com/lex/faqs#data-security Amazon Lex FAQ.>
putBotResponse_childDirected :: Lens.Lens' PutBotResponse (Prelude.Maybe Prelude.Bool)
putBotResponse_childDirected :: Lens' PutBotResponse (Maybe Bool)
putBotResponse_childDirected = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotResponse' {Maybe Bool
childDirected :: Maybe Bool
$sel:childDirected:PutBotResponse' :: PutBotResponse -> Maybe Bool
childDirected} -> Maybe Bool
childDirected) (\s :: PutBotResponse
s@PutBotResponse' {} Maybe Bool
a -> PutBotResponse
s {$sel:childDirected:PutBotResponse' :: Maybe Bool
childDirected = Maybe Bool
a} :: PutBotResponse)

-- | The prompts that Amazon Lex uses when it doesn\'t understand the user\'s
-- intent. For more information, see PutBot.
putBotResponse_clarificationPrompt :: Lens.Lens' PutBotResponse (Prelude.Maybe Prompt)
putBotResponse_clarificationPrompt :: Lens' PutBotResponse (Maybe Prompt)
putBotResponse_clarificationPrompt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotResponse' {Maybe Prompt
clarificationPrompt :: Maybe Prompt
$sel:clarificationPrompt:PutBotResponse' :: PutBotResponse -> Maybe Prompt
clarificationPrompt} -> Maybe Prompt
clarificationPrompt) (\s :: PutBotResponse
s@PutBotResponse' {} Maybe Prompt
a -> PutBotResponse
s {$sel:clarificationPrompt:PutBotResponse' :: Maybe Prompt
clarificationPrompt = Maybe Prompt
a} :: PutBotResponse)

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

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

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

-- | @true@ if the bot is configured to send user utterances to Amazon
-- Comprehend for sentiment analysis. If the @detectSentiment@ field was
-- not specified in the request, the @detectSentiment@ field is @false@ in
-- the response.
putBotResponse_detectSentiment :: Lens.Lens' PutBotResponse (Prelude.Maybe Prelude.Bool)
putBotResponse_detectSentiment :: Lens' PutBotResponse (Maybe Bool)
putBotResponse_detectSentiment = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotResponse' {Maybe Bool
detectSentiment :: Maybe Bool
$sel:detectSentiment:PutBotResponse' :: PutBotResponse -> Maybe Bool
detectSentiment} -> Maybe Bool
detectSentiment) (\s :: PutBotResponse
s@PutBotResponse' {} Maybe Bool
a -> PutBotResponse
s {$sel:detectSentiment:PutBotResponse' :: Maybe Bool
detectSentiment = Maybe Bool
a} :: PutBotResponse)

-- | Indicates whether the bot uses accuracy improvements. @true@ indicates
-- that the bot is using the improvements, otherwise, @false@.
putBotResponse_enableModelImprovements :: Lens.Lens' PutBotResponse (Prelude.Maybe Prelude.Bool)
putBotResponse_enableModelImprovements :: Lens' PutBotResponse (Maybe Bool)
putBotResponse_enableModelImprovements = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotResponse' {Maybe Bool
enableModelImprovements :: Maybe Bool
$sel:enableModelImprovements:PutBotResponse' :: PutBotResponse -> Maybe Bool
enableModelImprovements} -> Maybe Bool
enableModelImprovements) (\s :: PutBotResponse
s@PutBotResponse' {} Maybe Bool
a -> PutBotResponse
s {$sel:enableModelImprovements:PutBotResponse' :: Maybe Bool
enableModelImprovements = Maybe Bool
a} :: PutBotResponse)

-- | If @status@ is @FAILED@, Amazon Lex provides the reason that it failed
-- to build the bot.
putBotResponse_failureReason :: Lens.Lens' PutBotResponse (Prelude.Maybe Prelude.Text)
putBotResponse_failureReason :: Lens' PutBotResponse (Maybe Text)
putBotResponse_failureReason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotResponse' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:PutBotResponse' :: PutBotResponse -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: PutBotResponse
s@PutBotResponse' {} Maybe Text
a -> PutBotResponse
s {$sel:failureReason:PutBotResponse' :: Maybe Text
failureReason = Maybe Text
a} :: PutBotResponse)

-- | The maximum length of time that Amazon Lex retains the data gathered in
-- a conversation. For more information, see PutBot.
putBotResponse_idleSessionTTLInSeconds :: Lens.Lens' PutBotResponse (Prelude.Maybe Prelude.Natural)
putBotResponse_idleSessionTTLInSeconds :: Lens' PutBotResponse (Maybe Natural)
putBotResponse_idleSessionTTLInSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotResponse' {Maybe Natural
idleSessionTTLInSeconds :: Maybe Natural
$sel:idleSessionTTLInSeconds:PutBotResponse' :: PutBotResponse -> Maybe Natural
idleSessionTTLInSeconds} -> Maybe Natural
idleSessionTTLInSeconds) (\s :: PutBotResponse
s@PutBotResponse' {} Maybe Natural
a -> PutBotResponse
s {$sel:idleSessionTTLInSeconds:PutBotResponse' :: Maybe Natural
idleSessionTTLInSeconds = Maybe Natural
a} :: PutBotResponse)

-- | An array of @Intent@ objects. For more information, see PutBot.
putBotResponse_intents :: Lens.Lens' PutBotResponse (Prelude.Maybe [Intent])
putBotResponse_intents :: Lens' PutBotResponse (Maybe [Intent])
putBotResponse_intents = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotResponse' {Maybe [Intent]
intents :: Maybe [Intent]
$sel:intents:PutBotResponse' :: PutBotResponse -> Maybe [Intent]
intents} -> Maybe [Intent]
intents) (\s :: PutBotResponse
s@PutBotResponse' {} Maybe [Intent]
a -> PutBotResponse
s {$sel:intents:PutBotResponse' :: Maybe [Intent]
intents = Maybe [Intent]
a} :: PutBotResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The target locale for the bot.
putBotResponse_locale :: Lens.Lens' PutBotResponse (Prelude.Maybe Locale)
putBotResponse_locale :: Lens' PutBotResponse (Maybe Locale)
putBotResponse_locale = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotResponse' {Maybe Locale
locale :: Maybe Locale
$sel:locale:PutBotResponse' :: PutBotResponse -> Maybe Locale
locale} -> Maybe Locale
locale) (\s :: PutBotResponse
s@PutBotResponse' {} Maybe Locale
a -> PutBotResponse
s {$sel:locale:PutBotResponse' :: Maybe Locale
locale = Maybe Locale
a} :: PutBotResponse)

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

-- | The score that determines where Amazon Lex inserts the
-- @AMAZON.FallbackIntent@, @AMAZON.KendraSearchIntent@, or both when
-- returning alternative intents in a
-- <https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostContent.html PostContent>
-- or
-- <https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html PostText>
-- response. @AMAZON.FallbackIntent@ is inserted if the confidence score
-- for all intents is below this value. @AMAZON.KendraSearchIntent@ is only
-- inserted if it is configured for the bot.
putBotResponse_nluIntentConfidenceThreshold :: Lens.Lens' PutBotResponse (Prelude.Maybe Prelude.Double)
putBotResponse_nluIntentConfidenceThreshold :: Lens' PutBotResponse (Maybe Double)
putBotResponse_nluIntentConfidenceThreshold = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotResponse' {Maybe Double
nluIntentConfidenceThreshold :: Maybe Double
$sel:nluIntentConfidenceThreshold:PutBotResponse' :: PutBotResponse -> Maybe Double
nluIntentConfidenceThreshold} -> Maybe Double
nluIntentConfidenceThreshold) (\s :: PutBotResponse
s@PutBotResponse' {} Maybe Double
a -> PutBotResponse
s {$sel:nluIntentConfidenceThreshold:PutBotResponse' :: Maybe Double
nluIntentConfidenceThreshold = Maybe Double
a} :: PutBotResponse)

-- | When you send a request to create a bot with @processBehavior@ set to
-- @BUILD@, Amazon Lex sets the @status@ response element to @BUILDING@.
--
-- In the @READY_BASIC_TESTING@ state you can test the bot with user inputs
-- that exactly match the utterances configured for the bot\'s intents and
-- values in the slot types.
--
-- If Amazon Lex can\'t build the bot, Amazon Lex sets @status@ to
-- @FAILED@. Amazon Lex returns the reason for the failure in the
-- @failureReason@ response element.
--
-- When you set @processBehavior@ to @SAVE@, Amazon Lex sets the status
-- code to @NOT BUILT@.
--
-- When the bot is in the @READY@ state you can test and publish the bot.
putBotResponse_status :: Lens.Lens' PutBotResponse (Prelude.Maybe LexStatus)
putBotResponse_status :: Lens' PutBotResponse (Maybe LexStatus)
putBotResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotResponse' {Maybe LexStatus
status :: Maybe LexStatus
$sel:status:PutBotResponse' :: PutBotResponse -> Maybe LexStatus
status} -> Maybe LexStatus
status) (\s :: PutBotResponse
s@PutBotResponse' {} Maybe LexStatus
a -> PutBotResponse
s {$sel:status:PutBotResponse' :: Maybe LexStatus
status = Maybe LexStatus
a} :: PutBotResponse)

-- | A list of tags associated with the bot.
putBotResponse_tags :: Lens.Lens' PutBotResponse (Prelude.Maybe [Tag])
putBotResponse_tags :: Lens' PutBotResponse (Maybe [Tag])
putBotResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:PutBotResponse' :: PutBotResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: PutBotResponse
s@PutBotResponse' {} Maybe [Tag]
a -> PutBotResponse
s {$sel:tags:PutBotResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: PutBotResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The Amazon Polly voice ID that Amazon Lex uses for voice interaction
-- with the user. For more information, see PutBot.
putBotResponse_voiceId :: Lens.Lens' PutBotResponse (Prelude.Maybe Prelude.Text)
putBotResponse_voiceId :: Lens' PutBotResponse (Maybe Text)
putBotResponse_voiceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotResponse' {Maybe Text
voiceId :: Maybe Text
$sel:voiceId:PutBotResponse' :: PutBotResponse -> Maybe Text
voiceId} -> Maybe Text
voiceId) (\s :: PutBotResponse
s@PutBotResponse' {} Maybe Text
a -> PutBotResponse
s {$sel:voiceId:PutBotResponse' :: Maybe Text
voiceId = Maybe Text
a} :: PutBotResponse)

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

instance Prelude.NFData PutBotResponse where
  rnf :: PutBotResponse -> ()
rnf PutBotResponse' {Int
Maybe Bool
Maybe Double
Maybe Natural
Maybe [Intent]
Maybe [Tag]
Maybe Text
Maybe POSIX
Maybe LexStatus
Maybe Locale
Maybe Prompt
Maybe Statement
httpStatus :: Int
voiceId :: Maybe Text
version :: Maybe Text
tags :: Maybe [Tag]
status :: Maybe LexStatus
nluIntentConfidenceThreshold :: Maybe Double
name :: Maybe Text
locale :: Maybe Locale
lastUpdatedDate :: Maybe POSIX
intents :: Maybe [Intent]
idleSessionTTLInSeconds :: Maybe Natural
failureReason :: Maybe Text
enableModelImprovements :: Maybe Bool
detectSentiment :: Maybe Bool
description :: Maybe Text
createdDate :: Maybe POSIX
createVersion :: Maybe Bool
clarificationPrompt :: Maybe Prompt
childDirected :: Maybe Bool
checksum :: Maybe Text
abortStatement :: Maybe Statement
$sel:httpStatus:PutBotResponse' :: PutBotResponse -> Int
$sel:voiceId:PutBotResponse' :: PutBotResponse -> Maybe Text
$sel:version:PutBotResponse' :: PutBotResponse -> Maybe Text
$sel:tags:PutBotResponse' :: PutBotResponse -> Maybe [Tag]
$sel:status:PutBotResponse' :: PutBotResponse -> Maybe LexStatus
$sel:nluIntentConfidenceThreshold:PutBotResponse' :: PutBotResponse -> Maybe Double
$sel:name:PutBotResponse' :: PutBotResponse -> Maybe Text
$sel:locale:PutBotResponse' :: PutBotResponse -> Maybe Locale
$sel:lastUpdatedDate:PutBotResponse' :: PutBotResponse -> Maybe POSIX
$sel:intents:PutBotResponse' :: PutBotResponse -> Maybe [Intent]
$sel:idleSessionTTLInSeconds:PutBotResponse' :: PutBotResponse -> Maybe Natural
$sel:failureReason:PutBotResponse' :: PutBotResponse -> Maybe Text
$sel:enableModelImprovements:PutBotResponse' :: PutBotResponse -> Maybe Bool
$sel:detectSentiment:PutBotResponse' :: PutBotResponse -> Maybe Bool
$sel:description:PutBotResponse' :: PutBotResponse -> Maybe Text
$sel:createdDate:PutBotResponse' :: PutBotResponse -> Maybe POSIX
$sel:createVersion:PutBotResponse' :: PutBotResponse -> Maybe Bool
$sel:clarificationPrompt:PutBotResponse' :: PutBotResponse -> Maybe Prompt
$sel:childDirected:PutBotResponse' :: PutBotResponse -> Maybe Bool
$sel:checksum:PutBotResponse' :: PutBotResponse -> Maybe Text
$sel:abortStatement:PutBotResponse' :: PutBotResponse -> Maybe Statement
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Statement
abortStatement
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
checksum
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
childDirected
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Prompt
clarificationPrompt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
createVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
detectSentiment
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enableModelImprovements
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
failureReason
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
idleSessionTTLInSeconds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Intent]
intents
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdatedDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Locale
locale
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Double
nluIntentConfidenceThreshold
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LexStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
version
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
voiceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus