{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates an 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_intents,
    putBot_checksum,
    putBot_enableModelImprovements,
    putBot_nluIntentConfidenceThreshold,
    putBot_detectSentiment,
    putBot_processBehavior,
    putBot_idleSessionTTLInSeconds,
    putBot_clarificationPrompt,
    putBot_voiceId,
    putBot_createVersion,
    putBot_description,
    putBot_tags,
    putBot_name,
    putBot_locale,
    putBot_childDirected,

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

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

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

-- | /See:/ '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,
    -- | 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],
    -- | 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,
    -- | 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,
    -- | 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,
    -- | 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,
    -- | 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,
    -- | 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,
    -- | 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,
    -- | 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,
    -- | 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,
    -- | 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 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
(PutBot -> PutBot -> Bool)
-> (PutBot -> PutBot -> Bool) -> Eq PutBot
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]
(Int -> ReadS PutBot)
-> ReadS [PutBot]
-> ReadPrec PutBot
-> ReadPrec [PutBot]
-> Read 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
(Int -> PutBot -> ShowS)
-> (PutBot -> String) -> ([PutBot] -> ShowS) -> Show PutBot
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. PutBot -> Rep PutBot x)
-> (forall x. Rep PutBot x -> PutBot) -> Generic PutBot
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>.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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
--
-- '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@.
--
-- '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@.
--
-- '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).
--
-- '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.
--
-- '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/.
--
-- '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.
--
-- '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.
--
-- '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' :: Maybe Statement
-> Maybe [Intent]
-> Maybe Text
-> Maybe Bool
-> Maybe Double
-> Maybe Bool
-> Maybe ProcessBehavior
-> Maybe Natural
-> Maybe Prompt
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Tag]
-> Text
-> Locale
-> Bool
-> PutBot
PutBot'
    { $sel:abortStatement:PutBot' :: Maybe Statement
abortStatement = Maybe Statement
forall a. Maybe a
Prelude.Nothing,
      $sel:intents:PutBot' :: Maybe [Intent]
intents = Maybe [Intent]
forall a. Maybe a
Prelude.Nothing,
      $sel:checksum:PutBot' :: Maybe Text
checksum = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enableModelImprovements:PutBot' :: Maybe Bool
enableModelImprovements = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:nluIntentConfidenceThreshold:PutBot' :: Maybe Double
nluIntentConfidenceThreshold = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:detectSentiment:PutBot' :: Maybe Bool
detectSentiment = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:processBehavior:PutBot' :: Maybe ProcessBehavior
processBehavior = Maybe ProcessBehavior
forall a. Maybe a
Prelude.Nothing,
      $sel:idleSessionTTLInSeconds:PutBot' :: Maybe Natural
idleSessionTTLInSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:clarificationPrompt:PutBot' :: Maybe Prompt
clarificationPrompt = Maybe Prompt
forall a. Maybe a
Prelude.Nothing,
      $sel:voiceId:PutBot' :: Maybe Text
voiceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createVersion:PutBot' :: Maybe Bool
createVersion = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:description:PutBot' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:PutBot' :: Maybe [Tag]
tags = Maybe [Tag]
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 :: (Maybe Statement -> f (Maybe Statement)) -> PutBot -> f PutBot
putBot_abortStatement = (PutBot -> Maybe Statement)
-> (PutBot -> Maybe Statement -> PutBot)
-> Lens PutBot PutBot (Maybe Statement) (Maybe Statement)
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)

-- | 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 :: (Maybe [Intent] -> f (Maybe [Intent])) -> PutBot -> f PutBot
putBot_intents = (PutBot -> Maybe [Intent])
-> (PutBot -> Maybe [Intent] -> PutBot)
-> Lens PutBot PutBot (Maybe [Intent]) (Maybe [Intent])
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) ((Maybe [Intent] -> f (Maybe [Intent])) -> PutBot -> f PutBot)
-> ((Maybe [Intent] -> f (Maybe [Intent]))
    -> Maybe [Intent] -> f (Maybe [Intent]))
-> (Maybe [Intent] -> f (Maybe [Intent]))
-> PutBot
-> f PutBot
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Intent] [Intent] [Intent] [Intent]
-> Iso
     (Maybe [Intent]) (Maybe [Intent]) (Maybe [Intent]) (Maybe [Intent])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Intent] [Intent] [Intent] [Intent]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | 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 :: (Maybe Bool -> f (Maybe Bool)) -> PutBot -> f PutBot
putBot_enableModelImprovements = (PutBot -> Maybe Bool)
-> (PutBot -> Maybe Bool -> PutBot)
-> Lens PutBot PutBot (Maybe Bool) (Maybe Bool)
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)

-- | 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 :: (Maybe Double -> f (Maybe Double)) -> PutBot -> f PutBot
putBot_nluIntentConfidenceThreshold = (PutBot -> Maybe Double)
-> (PutBot -> Maybe Double -> PutBot)
-> Lens PutBot PutBot (Maybe Double) (Maybe Double)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool)) -> PutBot -> f PutBot
putBot_detectSentiment = (PutBot -> Maybe Bool)
-> (PutBot -> Maybe Bool -> PutBot)
-> Lens PutBot PutBot (Maybe Bool) (Maybe Bool)
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)

-- | 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 :: (Maybe ProcessBehavior -> f (Maybe ProcessBehavior))
-> PutBot -> f PutBot
putBot_processBehavior = (PutBot -> Maybe ProcessBehavior)
-> (PutBot -> Maybe ProcessBehavior -> PutBot)
-> Lens
     PutBot PutBot (Maybe ProcessBehavior) (Maybe 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)

-- | 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 :: (Maybe Natural -> f (Maybe Natural)) -> PutBot -> f PutBot
putBot_idleSessionTTLInSeconds = (PutBot -> Maybe Natural)
-> (PutBot -> Maybe Natural -> PutBot)
-> Lens PutBot PutBot (Maybe Natural) (Maybe Natural)
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)

-- | 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 :: (Maybe Prompt -> f (Maybe Prompt)) -> PutBot -> f PutBot
putBot_clarificationPrompt = (PutBot -> Maybe Prompt)
-> (PutBot -> Maybe Prompt -> PutBot)
-> Lens PutBot PutBot (Maybe Prompt) (Maybe Prompt)
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)

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

-- | 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 :: (Maybe Bool -> f (Maybe Bool)) -> PutBot -> f PutBot
putBot_createVersion = (PutBot -> Maybe Bool)
-> (PutBot -> Maybe Bool -> PutBot)
-> Lens PutBot PutBot (Maybe Bool) (Maybe Bool)
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 :: (Maybe Text -> f (Maybe Text)) -> PutBot -> f PutBot
putBot_description = (PutBot -> Maybe Text)
-> (PutBot -> Maybe Text -> PutBot)
-> Lens PutBot PutBot (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe [Tag] -> f (Maybe [Tag])) -> PutBot -> f PutBot
putBot_tags = (PutBot -> Maybe [Tag])
-> (PutBot -> Maybe [Tag] -> PutBot)
-> Lens PutBot PutBot (Maybe [Tag]) (Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag])) -> PutBot -> f PutBot)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> PutBot
-> f PutBot
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the bot. The name is /not/ case sensitive.
putBot_name :: Lens.Lens' PutBot Prelude.Text
putBot_name :: (Text -> f Text) -> PutBot -> f PutBot
putBot_name = (PutBot -> Text)
-> (PutBot -> Text -> PutBot) -> Lens PutBot PutBot Text Text
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 :: (Locale -> f Locale) -> PutBot -> f PutBot
putBot_locale = (PutBot -> Locale)
-> (PutBot -> Locale -> PutBot) -> Lens PutBot PutBot Locale 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 :: (Bool -> f Bool) -> PutBot -> f PutBot
putBot_childDirected = (PutBot -> Bool)
-> (PutBot -> Bool -> PutBot) -> Lens PutBot PutBot Bool Bool
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 :: PutBot -> Request PutBot
request = Service -> PutBot -> Request PutBot
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy PutBot
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutBot)))
response =
    (Int
 -> ResponseHeaders -> Object -> Either String (AWSResponse PutBot))
-> Logger
-> Service
-> Proxy PutBot
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutBot)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe LexStatus
-> Maybe Statement
-> Maybe [Intent]
-> Maybe Text
-> Maybe Bool
-> Maybe Double
-> Maybe Bool
-> Maybe Locale
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Prompt
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [Tag]
-> Int
-> PutBotResponse
PutBotResponse'
            (Maybe Text
 -> Maybe LexStatus
 -> Maybe Statement
 -> Maybe [Intent]
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Double
 -> Maybe Bool
 -> Maybe Locale
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Natural
 -> Maybe Prompt
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Text
 -> Maybe [Tag]
 -> Int
 -> PutBotResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe LexStatus
      -> Maybe Statement
      -> Maybe [Intent]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Double
      -> Maybe Bool
      -> Maybe Locale
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Prompt
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> PutBotResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"failureReason")
            Either
  String
  (Maybe LexStatus
   -> Maybe Statement
   -> Maybe [Intent]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Double
   -> Maybe Bool
   -> Maybe Locale
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Prompt
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> PutBotResponse)
-> Either String (Maybe LexStatus)
-> Either
     String
     (Maybe Statement
      -> Maybe [Intent]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Double
      -> Maybe Bool
      -> Maybe Locale
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Prompt
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe LexStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"status")
            Either
  String
  (Maybe Statement
   -> Maybe [Intent]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Double
   -> Maybe Bool
   -> Maybe Locale
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Prompt
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> PutBotResponse)
-> Either String (Maybe Statement)
-> Either
     String
     (Maybe [Intent]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Double
      -> Maybe Bool
      -> Maybe Locale
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Prompt
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Statement)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"abortStatement")
            Either
  String
  (Maybe [Intent]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Double
   -> Maybe Bool
   -> Maybe Locale
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Prompt
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> PutBotResponse)
-> Either String (Maybe [Intent])
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Maybe Double
      -> Maybe Bool
      -> Maybe Locale
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Prompt
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Intent]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"intents" Either String (Maybe (Maybe [Intent]))
-> Maybe [Intent] -> Either String (Maybe [Intent])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Intent]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe Bool
   -> Maybe Double
   -> Maybe Bool
   -> Maybe Locale
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Prompt
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> PutBotResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe Double
      -> Maybe Bool
      -> Maybe Locale
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Prompt
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"checksum")
            Either
  String
  (Maybe Bool
   -> Maybe Double
   -> Maybe Bool
   -> Maybe Locale
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Prompt
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> PutBotResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Double
      -> Maybe Bool
      -> Maybe Locale
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Prompt
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"enableModelImprovements")
            Either
  String
  (Maybe Double
   -> Maybe Bool
   -> Maybe Locale
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Prompt
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> PutBotResponse)
-> Either String (Maybe Double)
-> Either
     String
     (Maybe Bool
      -> Maybe Locale
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Prompt
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Double)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nluIntentConfidenceThreshold")
            Either
  String
  (Maybe Bool
   -> Maybe Locale
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Prompt
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> PutBotResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Locale
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Prompt
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"detectSentiment")
            Either
  String
  (Maybe Locale
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Prompt
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> PutBotResponse)
-> Either String (Maybe Locale)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Prompt
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Locale)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"locale")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Prompt
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> PutBotResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Prompt
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"createdDate")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Prompt
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> PutBotResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Natural
      -> Maybe Prompt
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"name")
            Either
  String
  (Maybe Text
   -> Maybe Natural
   -> Maybe Prompt
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> PutBotResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Natural
      -> Maybe Prompt
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"version")
            Either
  String
  (Maybe Natural
   -> Maybe Prompt
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> PutBotResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe Prompt
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"idleSessionTTLInSeconds")
            Either
  String
  (Maybe Prompt
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> PutBotResponse)
-> Either String (Maybe Prompt)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Prompt)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"clarificationPrompt")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> PutBotResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"voiceId")
            Either
  String
  (Maybe POSIX
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> PutBotResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"lastUpdatedDate")
            Either
  String
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> PutBotResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Bool -> Maybe Text -> Maybe [Tag] -> Int -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"createVersion")
            Either
  String
  (Maybe Bool -> Maybe Text -> Maybe [Tag] -> Int -> PutBotResponse)
-> Either String (Maybe Bool)
-> Either
     String (Maybe Text -> Maybe [Tag] -> Int -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"childDirected")
            Either String (Maybe Text -> Maybe [Tag] -> Int -> PutBotResponse)
-> Either String (Maybe Text)
-> Either String (Maybe [Tag] -> Int -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"description")
            Either String (Maybe [Tag] -> Int -> PutBotResponse)
-> Either String (Maybe [Tag])
-> Either String (Int -> PutBotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe [Tag]))
-> Maybe [Tag] -> Either String (Maybe [Tag])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> PutBotResponse)
-> Either String Int -> Either String PutBotResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable PutBot

instance Prelude.NFData PutBot

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

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

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

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

-- | /See:/ 'newPutBotResponse' smart constructor.
data PutBotResponse = PutBotResponse'
  { -- | If @status@ is @FAILED@, Amazon Lex provides the reason that it failed
    -- to build the bot.
    PutBotResponse -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | 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,
    -- | The message that Amazon Lex uses to cancel a conversation. For more
    -- information, see PutBot.
    PutBotResponse -> Maybe Statement
abortStatement :: Prelude.Maybe Statement,
    -- | An array of @Intent@ objects. For more information, see PutBot.
    PutBotResponse -> Maybe [Intent]
intents :: Prelude.Maybe [Intent],
    -- | Checksum of the bot that you created.
    PutBotResponse -> Maybe Text
checksum :: Prelude.Maybe Prelude.Text,
    -- | 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,
    -- | 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,
    -- | @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,
    -- | The target locale for the bot.
    PutBotResponse -> Maybe Locale
locale :: Prelude.Maybe Locale,
    -- | The date that the bot was created.
    PutBotResponse -> Maybe POSIX
createdDate :: Prelude.Maybe Core.POSIX,
    -- | The name of the bot.
    PutBotResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The version of the bot. For a new bot, the version is always @$LATEST@.
    PutBotResponse -> Maybe Text
version :: 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,
    -- | 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,
    -- | 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 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 Core.POSIX,
    -- | @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,
    -- | 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,
    -- | A description of the bot.
    PutBotResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | A list of tags associated with the bot.
    PutBotResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The response's http status code.
    PutBotResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (PutBotResponse -> PutBotResponse -> Bool
(PutBotResponse -> PutBotResponse -> Bool)
-> (PutBotResponse -> PutBotResponse -> Bool) -> Eq PutBotResponse
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]
(Int -> ReadS PutBotResponse)
-> ReadS [PutBotResponse]
-> ReadPrec PutBotResponse
-> ReadPrec [PutBotResponse]
-> Read 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
(Int -> PutBotResponse -> ShowS)
-> (PutBotResponse -> String)
-> ([PutBotResponse] -> ShowS)
-> Show PutBotResponse
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. PutBotResponse -> Rep PutBotResponse x)
-> (forall x. Rep PutBotResponse x -> PutBotResponse)
-> Generic PutBotResponse
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:
--
-- 'failureReason', 'putBotResponse_failureReason' - If @status@ is @FAILED@, Amazon Lex provides the reason that it failed
-- to build 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.
--
-- 'abortStatement', 'putBotResponse_abortStatement' - The message that Amazon Lex uses to cancel a conversation. For more
-- information, see PutBot.
--
-- 'intents', 'putBotResponse_intents' - An array of @Intent@ objects. For more information, see PutBot.
--
-- 'checksum', 'putBotResponse_checksum' - Checksum of the bot that you created.
--
-- 'enableModelImprovements', 'putBotResponse_enableModelImprovements' - Indicates whether the bot uses accuracy improvements. @true@ indicates
-- that the bot is using the improvements, otherwise, @false@.
--
-- '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.
--
-- '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.
--
-- 'locale', 'putBotResponse_locale' - The target locale for the bot.
--
-- 'createdDate', 'putBotResponse_createdDate' - The date that the bot was created.
--
-- 'name', 'putBotResponse_name' - The name of the bot.
--
-- 'version', 'putBotResponse_version' - The version of the bot. For a new bot, the version is always @$LATEST@.
--
-- 'idleSessionTTLInSeconds', 'putBotResponse_idleSessionTTLInSeconds' - The maximum length of time that Amazon Lex retains the data gathered in
-- a conversation. For more information, see PutBot.
--
-- 'clarificationPrompt', 'putBotResponse_clarificationPrompt' - The prompts that Amazon Lex uses when it doesn\'t understand the user\'s
-- intent. For more information, see PutBot.
--
-- 'voiceId', 'putBotResponse_voiceId' - The Amazon Polly voice ID that Amazon Lex uses for voice interaction
-- with the user. 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.
--
-- '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.
--
-- '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.>
--
-- 'description', 'putBotResponse_description' - A description of the bot.
--
-- 'tags', 'putBotResponse_tags' - A list of tags associated with the bot.
--
-- 'httpStatus', 'putBotResponse_httpStatus' - The response's http status code.
newPutBotResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutBotResponse
newPutBotResponse :: Int -> PutBotResponse
newPutBotResponse Int
pHttpStatus_ =
  PutBotResponse' :: Maybe Text
-> Maybe LexStatus
-> Maybe Statement
-> Maybe [Intent]
-> Maybe Text
-> Maybe Bool
-> Maybe Double
-> Maybe Bool
-> Maybe Locale
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Prompt
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [Tag]
-> Int
-> PutBotResponse
PutBotResponse'
    { $sel:failureReason:PutBotResponse' :: Maybe Text
failureReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:PutBotResponse' :: Maybe LexStatus
status = Maybe LexStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:abortStatement:PutBotResponse' :: Maybe Statement
abortStatement = Maybe Statement
forall a. Maybe a
Prelude.Nothing,
      $sel:intents:PutBotResponse' :: Maybe [Intent]
intents = Maybe [Intent]
forall a. Maybe a
Prelude.Nothing,
      $sel:checksum:PutBotResponse' :: Maybe Text
checksum = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enableModelImprovements:PutBotResponse' :: Maybe Bool
enableModelImprovements = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:nluIntentConfidenceThreshold:PutBotResponse' :: Maybe Double
nluIntentConfidenceThreshold = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:detectSentiment:PutBotResponse' :: Maybe Bool
detectSentiment = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:locale:PutBotResponse' :: Maybe Locale
locale = Maybe Locale
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:PutBotResponse' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:name:PutBotResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:PutBotResponse' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:idleSessionTTLInSeconds:PutBotResponse' :: Maybe Natural
idleSessionTTLInSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:clarificationPrompt:PutBotResponse' :: Maybe Prompt
clarificationPrompt = Maybe Prompt
forall a. Maybe a
Prelude.Nothing,
      $sel:voiceId:PutBotResponse' :: Maybe Text
voiceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDate:PutBotResponse' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createVersion:PutBotResponse' :: Maybe Bool
createVersion = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:childDirected:PutBotResponse' :: Maybe Bool
childDirected = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:description:PutBotResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:PutBotResponse' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:PutBotResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | 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 :: (Maybe LexStatus -> f (Maybe LexStatus))
-> PutBotResponse -> f PutBotResponse
putBotResponse_status = (PutBotResponse -> Maybe LexStatus)
-> (PutBotResponse -> Maybe LexStatus -> PutBotResponse)
-> Lens
     PutBotResponse PutBotResponse (Maybe LexStatus) (Maybe LexStatus)
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)

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

-- | An array of @Intent@ objects. For more information, see PutBot.
putBotResponse_intents :: Lens.Lens' PutBotResponse (Prelude.Maybe [Intent])
putBotResponse_intents :: (Maybe [Intent] -> f (Maybe [Intent]))
-> PutBotResponse -> f PutBotResponse
putBotResponse_intents = (PutBotResponse -> Maybe [Intent])
-> (PutBotResponse -> Maybe [Intent] -> PutBotResponse)
-> Lens
     PutBotResponse PutBotResponse (Maybe [Intent]) (Maybe [Intent])
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) ((Maybe [Intent] -> f (Maybe [Intent]))
 -> PutBotResponse -> f PutBotResponse)
-> ((Maybe [Intent] -> f (Maybe [Intent]))
    -> Maybe [Intent] -> f (Maybe [Intent]))
-> (Maybe [Intent] -> f (Maybe [Intent]))
-> PutBotResponse
-> f PutBotResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Intent] [Intent] [Intent] [Intent]
-> Iso
     (Maybe [Intent]) (Maybe [Intent]) (Maybe [Intent]) (Maybe [Intent])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Intent] [Intent] [Intent] [Intent]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Checksum of the bot that you created.
putBotResponse_checksum :: Lens.Lens' PutBotResponse (Prelude.Maybe Prelude.Text)
putBotResponse_checksum :: (Maybe Text -> f (Maybe Text))
-> PutBotResponse -> f PutBotResponse
putBotResponse_checksum = (PutBotResponse -> Maybe Text)
-> (PutBotResponse -> Maybe Text -> PutBotResponse)
-> Lens PutBotResponse PutBotResponse (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool))
-> PutBotResponse -> f PutBotResponse
putBotResponse_enableModelImprovements = (PutBotResponse -> Maybe Bool)
-> (PutBotResponse -> Maybe Bool -> PutBotResponse)
-> Lens PutBotResponse PutBotResponse (Maybe Bool) (Maybe Bool)
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)

-- | 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 :: (Maybe Double -> f (Maybe Double))
-> PutBotResponse -> f PutBotResponse
putBotResponse_nluIntentConfidenceThreshold = (PutBotResponse -> Maybe Double)
-> (PutBotResponse -> Maybe Double -> PutBotResponse)
-> Lens PutBotResponse PutBotResponse (Maybe Double) (Maybe Double)
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)

-- | @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 :: (Maybe Bool -> f (Maybe Bool))
-> PutBotResponse -> f PutBotResponse
putBotResponse_detectSentiment = (PutBotResponse -> Maybe Bool)
-> (PutBotResponse -> Maybe Bool -> PutBotResponse)
-> Lens PutBotResponse PutBotResponse (Maybe Bool) (Maybe Bool)
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)

-- | The target locale for the bot.
putBotResponse_locale :: Lens.Lens' PutBotResponse (Prelude.Maybe Locale)
putBotResponse_locale :: (Maybe Locale -> f (Maybe Locale))
-> PutBotResponse -> f PutBotResponse
putBotResponse_locale = (PutBotResponse -> Maybe Locale)
-> (PutBotResponse -> Maybe Locale -> PutBotResponse)
-> Lens PutBotResponse PutBotResponse (Maybe Locale) (Maybe 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 date that the bot was created.
putBotResponse_createdDate :: Lens.Lens' PutBotResponse (Prelude.Maybe Prelude.UTCTime)
putBotResponse_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PutBotResponse -> f PutBotResponse
putBotResponse_createdDate = (PutBotResponse -> Maybe POSIX)
-> (PutBotResponse -> Maybe POSIX -> PutBotResponse)
-> Lens PutBotResponse PutBotResponse (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
 -> PutBotResponse -> f PutBotResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PutBotResponse
-> f PutBotResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name of the bot.
putBotResponse_name :: Lens.Lens' PutBotResponse (Prelude.Maybe Prelude.Text)
putBotResponse_name :: (Maybe Text -> f (Maybe Text))
-> PutBotResponse -> f PutBotResponse
putBotResponse_name = (PutBotResponse -> Maybe Text)
-> (PutBotResponse -> Maybe Text -> PutBotResponse)
-> Lens PutBotResponse PutBotResponse (Maybe Text) (Maybe Text)
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 version of the bot. For a new bot, the version is always @$LATEST@.
putBotResponse_version :: Lens.Lens' PutBotResponse (Prelude.Maybe Prelude.Text)
putBotResponse_version :: (Maybe Text -> f (Maybe Text))
-> PutBotResponse -> f PutBotResponse
putBotResponse_version = (PutBotResponse -> Maybe Text)
-> (PutBotResponse -> Maybe Text -> PutBotResponse)
-> Lens PutBotResponse PutBotResponse (Maybe Text) (Maybe Text)
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 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 :: (Maybe Natural -> f (Maybe Natural))
-> PutBotResponse -> f PutBotResponse
putBotResponse_idleSessionTTLInSeconds = (PutBotResponse -> Maybe Natural)
-> (PutBotResponse -> Maybe Natural -> PutBotResponse)
-> Lens
     PutBotResponse PutBotResponse (Maybe Natural) (Maybe Natural)
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)

-- | 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 :: (Maybe Prompt -> f (Maybe Prompt))
-> PutBotResponse -> f PutBotResponse
putBotResponse_clarificationPrompt = (PutBotResponse -> Maybe Prompt)
-> (PutBotResponse -> Maybe Prompt -> PutBotResponse)
-> Lens PutBotResponse PutBotResponse (Maybe Prompt) (Maybe Prompt)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> PutBotResponse -> f PutBotResponse
putBotResponse_voiceId = (PutBotResponse -> Maybe Text)
-> (PutBotResponse -> Maybe Text -> PutBotResponse)
-> Lens PutBotResponse PutBotResponse (Maybe Text) (Maybe Text)
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 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 :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PutBotResponse -> f PutBotResponse
putBotResponse_lastUpdatedDate = (PutBotResponse -> Maybe POSIX)
-> (PutBotResponse -> Maybe POSIX -> PutBotResponse)
-> Lens PutBotResponse PutBotResponse (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
 -> PutBotResponse -> f PutBotResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PutBotResponse
-> f PutBotResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | @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 :: (Maybe Bool -> f (Maybe Bool))
-> PutBotResponse -> f PutBotResponse
putBotResponse_createVersion = (PutBotResponse -> Maybe Bool)
-> (PutBotResponse -> Maybe Bool -> PutBotResponse)
-> Lens PutBotResponse PutBotResponse (Maybe Bool) (Maybe Bool)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool))
-> PutBotResponse -> f PutBotResponse
putBotResponse_childDirected = (PutBotResponse -> Maybe Bool)
-> (PutBotResponse -> Maybe Bool -> PutBotResponse)
-> Lens PutBotResponse PutBotResponse (Maybe Bool) (Maybe Bool)
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)

-- | A description of the bot.
putBotResponse_description :: Lens.Lens' PutBotResponse (Prelude.Maybe Prelude.Text)
putBotResponse_description :: (Maybe Text -> f (Maybe Text))
-> PutBotResponse -> f PutBotResponse
putBotResponse_description = (PutBotResponse -> Maybe Text)
-> (PutBotResponse -> Maybe Text -> PutBotResponse)
-> Lens PutBotResponse PutBotResponse (Maybe Text) (Maybe Text)
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)

-- | A list of tags associated with the bot.
putBotResponse_tags :: Lens.Lens' PutBotResponse (Prelude.Maybe [Tag])
putBotResponse_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> PutBotResponse -> f PutBotResponse
putBotResponse_tags = (PutBotResponse -> Maybe [Tag])
-> (PutBotResponse -> Maybe [Tag] -> PutBotResponse)
-> Lens PutBotResponse PutBotResponse (Maybe [Tag]) (Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> PutBotResponse -> f PutBotResponse)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> PutBotResponse
-> f PutBotResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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