{-# 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.CreateIntentVersion
-- 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 a new version of an intent based on the @$LATEST@ version of the
-- intent. If the @$LATEST@ version of this intent hasn\'t changed since
-- you last updated it, Amazon Lex doesn\'t create a new version. It
-- returns the last version you created.
--
-- You can update only the @$LATEST@ version of the intent. You can\'t
-- update the numbered versions that you create with the
-- @CreateIntentVersion@ operation.
--
-- When you create a version of an intent, Amazon Lex sets the version to
-- 1. Subsequent versions increment by 1. For more information, see
-- versioning-intro.
--
-- This operation requires permissions to perform the
-- @lex:CreateIntentVersion@ action.
module Amazonka.LexModels.CreateIntentVersion
  ( -- * Creating a Request
    CreateIntentVersion (..),
    newCreateIntentVersion,

    -- * Request Lenses
    createIntentVersion_checksum,
    createIntentVersion_name,

    -- * Destructuring the Response
    CreateIntentVersionResponse (..),
    newCreateIntentVersionResponse,

    -- * Response Lenses
    createIntentVersionResponse_fulfillmentActivity,
    createIntentVersionResponse_slots,
    createIntentVersionResponse_rejectionStatement,
    createIntentVersionResponse_checksum,
    createIntentVersionResponse_conclusionStatement,
    createIntentVersionResponse_sampleUtterances,
    createIntentVersionResponse_parentIntentSignature,
    createIntentVersionResponse_createdDate,
    createIntentVersionResponse_kendraConfiguration,
    createIntentVersionResponse_name,
    createIntentVersionResponse_version,
    createIntentVersionResponse_inputContexts,
    createIntentVersionResponse_followUpPrompt,
    createIntentVersionResponse_lastUpdatedDate,
    createIntentVersionResponse_outputContexts,
    createIntentVersionResponse_confirmationPrompt,
    createIntentVersionResponse_dialogCodeHook,
    createIntentVersionResponse_description,
    createIntentVersionResponse_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:/ 'newCreateIntentVersion' smart constructor.
data CreateIntentVersion = CreateIntentVersion'
  { -- | Checksum of the @$LATEST@ version of the intent that should be used to
    -- create the new version. If you specify a checksum and the @$LATEST@
    -- version of the intent has a different checksum, Amazon Lex returns a
    -- @PreconditionFailedException@ exception and doesn\'t publish a new
    -- version. If you don\'t specify a checksum, Amazon Lex publishes the
    -- @$LATEST@ version.
    CreateIntentVersion -> Maybe Text
checksum :: Prelude.Maybe Prelude.Text,
    -- | The name of the intent that you want to create a new version of. The
    -- name is case sensitive.
    CreateIntentVersion -> Text
name :: Prelude.Text
  }
  deriving (CreateIntentVersion -> CreateIntentVersion -> Bool
(CreateIntentVersion -> CreateIntentVersion -> Bool)
-> (CreateIntentVersion -> CreateIntentVersion -> Bool)
-> Eq CreateIntentVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateIntentVersion -> CreateIntentVersion -> Bool
$c/= :: CreateIntentVersion -> CreateIntentVersion -> Bool
== :: CreateIntentVersion -> CreateIntentVersion -> Bool
$c== :: CreateIntentVersion -> CreateIntentVersion -> Bool
Prelude.Eq, ReadPrec [CreateIntentVersion]
ReadPrec CreateIntentVersion
Int -> ReadS CreateIntentVersion
ReadS [CreateIntentVersion]
(Int -> ReadS CreateIntentVersion)
-> ReadS [CreateIntentVersion]
-> ReadPrec CreateIntentVersion
-> ReadPrec [CreateIntentVersion]
-> Read CreateIntentVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateIntentVersion]
$creadListPrec :: ReadPrec [CreateIntentVersion]
readPrec :: ReadPrec CreateIntentVersion
$creadPrec :: ReadPrec CreateIntentVersion
readList :: ReadS [CreateIntentVersion]
$creadList :: ReadS [CreateIntentVersion]
readsPrec :: Int -> ReadS CreateIntentVersion
$creadsPrec :: Int -> ReadS CreateIntentVersion
Prelude.Read, Int -> CreateIntentVersion -> ShowS
[CreateIntentVersion] -> ShowS
CreateIntentVersion -> String
(Int -> CreateIntentVersion -> ShowS)
-> (CreateIntentVersion -> String)
-> ([CreateIntentVersion] -> ShowS)
-> Show CreateIntentVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateIntentVersion] -> ShowS
$cshowList :: [CreateIntentVersion] -> ShowS
show :: CreateIntentVersion -> String
$cshow :: CreateIntentVersion -> String
showsPrec :: Int -> CreateIntentVersion -> ShowS
$cshowsPrec :: Int -> CreateIntentVersion -> ShowS
Prelude.Show, (forall x. CreateIntentVersion -> Rep CreateIntentVersion x)
-> (forall x. Rep CreateIntentVersion x -> CreateIntentVersion)
-> Generic CreateIntentVersion
forall x. Rep CreateIntentVersion x -> CreateIntentVersion
forall x. CreateIntentVersion -> Rep CreateIntentVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateIntentVersion x -> CreateIntentVersion
$cfrom :: forall x. CreateIntentVersion -> Rep CreateIntentVersion x
Prelude.Generic)

-- |
-- Create a value of 'CreateIntentVersion' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'checksum', 'createIntentVersion_checksum' - Checksum of the @$LATEST@ version of the intent that should be used to
-- create the new version. If you specify a checksum and the @$LATEST@
-- version of the intent has a different checksum, Amazon Lex returns a
-- @PreconditionFailedException@ exception and doesn\'t publish a new
-- version. If you don\'t specify a checksum, Amazon Lex publishes the
-- @$LATEST@ version.
--
-- 'name', 'createIntentVersion_name' - The name of the intent that you want to create a new version of. The
-- name is case sensitive.
newCreateIntentVersion ::
  -- | 'name'
  Prelude.Text ->
  CreateIntentVersion
newCreateIntentVersion :: Text -> CreateIntentVersion
newCreateIntentVersion Text
pName_ =
  CreateIntentVersion' :: Maybe Text -> Text -> CreateIntentVersion
CreateIntentVersion'
    { $sel:checksum:CreateIntentVersion' :: Maybe Text
checksum = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateIntentVersion' :: Text
name = Text
pName_
    }

-- | Checksum of the @$LATEST@ version of the intent that should be used to
-- create the new version. If you specify a checksum and the @$LATEST@
-- version of the intent has a different checksum, Amazon Lex returns a
-- @PreconditionFailedException@ exception and doesn\'t publish a new
-- version. If you don\'t specify a checksum, Amazon Lex publishes the
-- @$LATEST@ version.
createIntentVersion_checksum :: Lens.Lens' CreateIntentVersion (Prelude.Maybe Prelude.Text)
createIntentVersion_checksum :: (Maybe Text -> f (Maybe Text))
-> CreateIntentVersion -> f CreateIntentVersion
createIntentVersion_checksum = (CreateIntentVersion -> Maybe Text)
-> (CreateIntentVersion -> Maybe Text -> CreateIntentVersion)
-> Lens
     CreateIntentVersion CreateIntentVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntentVersion' {Maybe Text
checksum :: Maybe Text
$sel:checksum:CreateIntentVersion' :: CreateIntentVersion -> Maybe Text
checksum} -> Maybe Text
checksum) (\s :: CreateIntentVersion
s@CreateIntentVersion' {} Maybe Text
a -> CreateIntentVersion
s {$sel:checksum:CreateIntentVersion' :: Maybe Text
checksum = Maybe Text
a} :: CreateIntentVersion)

-- | The name of the intent that you want to create a new version of. The
-- name is case sensitive.
createIntentVersion_name :: Lens.Lens' CreateIntentVersion Prelude.Text
createIntentVersion_name :: (Text -> f Text) -> CreateIntentVersion -> f CreateIntentVersion
createIntentVersion_name = (CreateIntentVersion -> Text)
-> (CreateIntentVersion -> Text -> CreateIntentVersion)
-> Lens CreateIntentVersion CreateIntentVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntentVersion' {Text
name :: Text
$sel:name:CreateIntentVersion' :: CreateIntentVersion -> Text
name} -> Text
name) (\s :: CreateIntentVersion
s@CreateIntentVersion' {} Text
a -> CreateIntentVersion
s {$sel:name:CreateIntentVersion' :: Text
name = Text
a} :: CreateIntentVersion)

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

instance Prelude.NFData CreateIntentVersion

instance Core.ToHeaders CreateIntentVersion where
  toHeaders :: CreateIntentVersion -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateIntentVersion -> 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 CreateIntentVersion where
  toJSON :: CreateIntentVersion -> Value
toJSON CreateIntentVersion' {Maybe Text
Text
name :: Text
checksum :: Maybe Text
$sel:name:CreateIntentVersion' :: CreateIntentVersion -> Text
$sel:checksum:CreateIntentVersion' :: CreateIntentVersion -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [(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]
      )

instance Core.ToPath CreateIntentVersion where
  toPath :: CreateIntentVersion -> ByteString
toPath CreateIntentVersion' {Maybe Text
Text
name :: Text
checksum :: Maybe Text
$sel:name:CreateIntentVersion' :: CreateIntentVersion -> Text
$sel:checksum:CreateIntentVersion' :: CreateIntentVersion -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/intents/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
name, ByteString
"/versions"]

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

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

-- |
-- Create a value of 'CreateIntentVersionResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'fulfillmentActivity', 'createIntentVersionResponse_fulfillmentActivity' - Describes how the intent is fulfilled.
--
-- 'slots', 'createIntentVersionResponse_slots' - An array of slot types that defines the information required to fulfill
-- the intent.
--
-- 'rejectionStatement', 'createIntentVersionResponse_rejectionStatement' - If the user answers \"no\" to the question defined in
-- @confirmationPrompt@, Amazon Lex responds with this statement to
-- acknowledge that the intent was canceled.
--
-- 'checksum', 'createIntentVersionResponse_checksum' - Checksum of the intent version created.
--
-- 'conclusionStatement', 'createIntentVersionResponse_conclusionStatement' - After the Lambda function specified in the @fulfillmentActivity@ field
-- fulfills the intent, Amazon Lex conveys this statement to the user.
--
-- 'sampleUtterances', 'createIntentVersionResponse_sampleUtterances' - An array of sample utterances configured for the intent.
--
-- 'parentIntentSignature', 'createIntentVersionResponse_parentIntentSignature' - A unique identifier for a built-in intent.
--
-- 'createdDate', 'createIntentVersionResponse_createdDate' - The date that the intent was created.
--
-- 'kendraConfiguration', 'createIntentVersionResponse_kendraConfiguration' - Configuration information, if any, for connecting an Amazon Kendra index
-- with the @AMAZON.KendraSearchIntent@ intent.
--
-- 'name', 'createIntentVersionResponse_name' - The name of the intent.
--
-- 'version', 'createIntentVersionResponse_version' - The version number assigned to the new version of the intent.
--
-- 'inputContexts', 'createIntentVersionResponse_inputContexts' - An array of @InputContext@ objects that lists the contexts that must be
-- active for Amazon Lex to choose the intent in a conversation with the
-- user.
--
-- 'followUpPrompt', 'createIntentVersionResponse_followUpPrompt' - If defined, Amazon Lex uses this prompt to solicit additional user
-- activity after the intent is fulfilled.
--
-- 'lastUpdatedDate', 'createIntentVersionResponse_lastUpdatedDate' - The date that the intent was updated.
--
-- 'outputContexts', 'createIntentVersionResponse_outputContexts' - An array of @OutputContext@ objects that lists the contexts that the
-- intent activates when the intent is fulfilled.
--
-- 'confirmationPrompt', 'createIntentVersionResponse_confirmationPrompt' - If defined, the prompt that Amazon Lex uses to confirm the user\'s
-- intent before fulfilling it.
--
-- 'dialogCodeHook', 'createIntentVersionResponse_dialogCodeHook' - If defined, Amazon Lex invokes this Lambda function for each user input.
--
-- 'description', 'createIntentVersionResponse_description' - A description of the intent.
--
-- 'httpStatus', 'createIntentVersionResponse_httpStatus' - The response's http status code.
newCreateIntentVersionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateIntentVersionResponse
newCreateIntentVersionResponse :: Int -> CreateIntentVersionResponse
newCreateIntentVersionResponse Int
pHttpStatus_ =
  CreateIntentVersionResponse' :: Maybe FulfillmentActivity
-> Maybe [Slot]
-> Maybe Statement
-> Maybe Text
-> Maybe Statement
-> Maybe [Text]
-> Maybe Text
-> Maybe POSIX
-> Maybe KendraConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe [InputContext]
-> Maybe FollowUpPrompt
-> Maybe POSIX
-> Maybe [OutputContext]
-> Maybe Prompt
-> Maybe CodeHook
-> Maybe Text
-> Int
-> CreateIntentVersionResponse
CreateIntentVersionResponse'
    { $sel:fulfillmentActivity:CreateIntentVersionResponse' :: Maybe FulfillmentActivity
fulfillmentActivity =
        Maybe FulfillmentActivity
forall a. Maybe a
Prelude.Nothing,
      $sel:slots:CreateIntentVersionResponse' :: Maybe [Slot]
slots = Maybe [Slot]
forall a. Maybe a
Prelude.Nothing,
      $sel:rejectionStatement:CreateIntentVersionResponse' :: Maybe Statement
rejectionStatement = Maybe Statement
forall a. Maybe a
Prelude.Nothing,
      $sel:checksum:CreateIntentVersionResponse' :: Maybe Text
checksum = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:conclusionStatement:CreateIntentVersionResponse' :: Maybe Statement
conclusionStatement = Maybe Statement
forall a. Maybe a
Prelude.Nothing,
      $sel:sampleUtterances:CreateIntentVersionResponse' :: Maybe [Text]
sampleUtterances = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:parentIntentSignature:CreateIntentVersionResponse' :: Maybe Text
parentIntentSignature = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:CreateIntentVersionResponse' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:kendraConfiguration:CreateIntentVersionResponse' :: Maybe KendraConfiguration
kendraConfiguration = Maybe KendraConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateIntentVersionResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:CreateIntentVersionResponse' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:inputContexts:CreateIntentVersionResponse' :: Maybe [InputContext]
inputContexts = Maybe [InputContext]
forall a. Maybe a
Prelude.Nothing,
      $sel:followUpPrompt:CreateIntentVersionResponse' :: Maybe FollowUpPrompt
followUpPrompt = Maybe FollowUpPrompt
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDate:CreateIntentVersionResponse' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:outputContexts:CreateIntentVersionResponse' :: Maybe [OutputContext]
outputContexts = Maybe [OutputContext]
forall a. Maybe a
Prelude.Nothing,
      $sel:confirmationPrompt:CreateIntentVersionResponse' :: Maybe Prompt
confirmationPrompt = Maybe Prompt
forall a. Maybe a
Prelude.Nothing,
      $sel:dialogCodeHook:CreateIntentVersionResponse' :: Maybe CodeHook
dialogCodeHook = Maybe CodeHook
forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateIntentVersionResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateIntentVersionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Describes how the intent is fulfilled.
createIntentVersionResponse_fulfillmentActivity :: Lens.Lens' CreateIntentVersionResponse (Prelude.Maybe FulfillmentActivity)
createIntentVersionResponse_fulfillmentActivity :: (Maybe FulfillmentActivity -> f (Maybe FulfillmentActivity))
-> CreateIntentVersionResponse -> f CreateIntentVersionResponse
createIntentVersionResponse_fulfillmentActivity = (CreateIntentVersionResponse -> Maybe FulfillmentActivity)
-> (CreateIntentVersionResponse
    -> Maybe FulfillmentActivity -> CreateIntentVersionResponse)
-> Lens
     CreateIntentVersionResponse
     CreateIntentVersionResponse
     (Maybe FulfillmentActivity)
     (Maybe FulfillmentActivity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntentVersionResponse' {Maybe FulfillmentActivity
fulfillmentActivity :: Maybe FulfillmentActivity
$sel:fulfillmentActivity:CreateIntentVersionResponse' :: CreateIntentVersionResponse -> Maybe FulfillmentActivity
fulfillmentActivity} -> Maybe FulfillmentActivity
fulfillmentActivity) (\s :: CreateIntentVersionResponse
s@CreateIntentVersionResponse' {} Maybe FulfillmentActivity
a -> CreateIntentVersionResponse
s {$sel:fulfillmentActivity:CreateIntentVersionResponse' :: Maybe FulfillmentActivity
fulfillmentActivity = Maybe FulfillmentActivity
a} :: CreateIntentVersionResponse)

-- | An array of slot types that defines the information required to fulfill
-- the intent.
createIntentVersionResponse_slots :: Lens.Lens' CreateIntentVersionResponse (Prelude.Maybe [Slot])
createIntentVersionResponse_slots :: (Maybe [Slot] -> f (Maybe [Slot]))
-> CreateIntentVersionResponse -> f CreateIntentVersionResponse
createIntentVersionResponse_slots = (CreateIntentVersionResponse -> Maybe [Slot])
-> (CreateIntentVersionResponse
    -> Maybe [Slot] -> CreateIntentVersionResponse)
-> Lens
     CreateIntentVersionResponse
     CreateIntentVersionResponse
     (Maybe [Slot])
     (Maybe [Slot])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntentVersionResponse' {Maybe [Slot]
slots :: Maybe [Slot]
$sel:slots:CreateIntentVersionResponse' :: CreateIntentVersionResponse -> Maybe [Slot]
slots} -> Maybe [Slot]
slots) (\s :: CreateIntentVersionResponse
s@CreateIntentVersionResponse' {} Maybe [Slot]
a -> CreateIntentVersionResponse
s {$sel:slots:CreateIntentVersionResponse' :: Maybe [Slot]
slots = Maybe [Slot]
a} :: CreateIntentVersionResponse) ((Maybe [Slot] -> f (Maybe [Slot]))
 -> CreateIntentVersionResponse -> f CreateIntentVersionResponse)
-> ((Maybe [Slot] -> f (Maybe [Slot]))
    -> Maybe [Slot] -> f (Maybe [Slot]))
-> (Maybe [Slot] -> f (Maybe [Slot]))
-> CreateIntentVersionResponse
-> f CreateIntentVersionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Slot] [Slot] [Slot] [Slot]
-> Iso (Maybe [Slot]) (Maybe [Slot]) (Maybe [Slot]) (Maybe [Slot])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Slot] [Slot] [Slot] [Slot]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

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

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

-- | A unique identifier for a built-in intent.
createIntentVersionResponse_parentIntentSignature :: Lens.Lens' CreateIntentVersionResponse (Prelude.Maybe Prelude.Text)
createIntentVersionResponse_parentIntentSignature :: (Maybe Text -> f (Maybe Text))
-> CreateIntentVersionResponse -> f CreateIntentVersionResponse
createIntentVersionResponse_parentIntentSignature = (CreateIntentVersionResponse -> Maybe Text)
-> (CreateIntentVersionResponse
    -> Maybe Text -> CreateIntentVersionResponse)
-> Lens
     CreateIntentVersionResponse
     CreateIntentVersionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntentVersionResponse' {Maybe Text
parentIntentSignature :: Maybe Text
$sel:parentIntentSignature:CreateIntentVersionResponse' :: CreateIntentVersionResponse -> Maybe Text
parentIntentSignature} -> Maybe Text
parentIntentSignature) (\s :: CreateIntentVersionResponse
s@CreateIntentVersionResponse' {} Maybe Text
a -> CreateIntentVersionResponse
s {$sel:parentIntentSignature:CreateIntentVersionResponse' :: Maybe Text
parentIntentSignature = Maybe Text
a} :: CreateIntentVersionResponse)

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

-- | Configuration information, if any, for connecting an Amazon Kendra index
-- with the @AMAZON.KendraSearchIntent@ intent.
createIntentVersionResponse_kendraConfiguration :: Lens.Lens' CreateIntentVersionResponse (Prelude.Maybe KendraConfiguration)
createIntentVersionResponse_kendraConfiguration :: (Maybe KendraConfiguration -> f (Maybe KendraConfiguration))
-> CreateIntentVersionResponse -> f CreateIntentVersionResponse
createIntentVersionResponse_kendraConfiguration = (CreateIntentVersionResponse -> Maybe KendraConfiguration)
-> (CreateIntentVersionResponse
    -> Maybe KendraConfiguration -> CreateIntentVersionResponse)
-> Lens
     CreateIntentVersionResponse
     CreateIntentVersionResponse
     (Maybe KendraConfiguration)
     (Maybe KendraConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntentVersionResponse' {Maybe KendraConfiguration
kendraConfiguration :: Maybe KendraConfiguration
$sel:kendraConfiguration:CreateIntentVersionResponse' :: CreateIntentVersionResponse -> Maybe KendraConfiguration
kendraConfiguration} -> Maybe KendraConfiguration
kendraConfiguration) (\s :: CreateIntentVersionResponse
s@CreateIntentVersionResponse' {} Maybe KendraConfiguration
a -> CreateIntentVersionResponse
s {$sel:kendraConfiguration:CreateIntentVersionResponse' :: Maybe KendraConfiguration
kendraConfiguration = Maybe KendraConfiguration
a} :: CreateIntentVersionResponse)

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

-- | The version number assigned to the new version of the intent.
createIntentVersionResponse_version :: Lens.Lens' CreateIntentVersionResponse (Prelude.Maybe Prelude.Text)
createIntentVersionResponse_version :: (Maybe Text -> f (Maybe Text))
-> CreateIntentVersionResponse -> f CreateIntentVersionResponse
createIntentVersionResponse_version = (CreateIntentVersionResponse -> Maybe Text)
-> (CreateIntentVersionResponse
    -> Maybe Text -> CreateIntentVersionResponse)
-> Lens
     CreateIntentVersionResponse
     CreateIntentVersionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntentVersionResponse' {Maybe Text
version :: Maybe Text
$sel:version:CreateIntentVersionResponse' :: CreateIntentVersionResponse -> Maybe Text
version} -> Maybe Text
version) (\s :: CreateIntentVersionResponse
s@CreateIntentVersionResponse' {} Maybe Text
a -> CreateIntentVersionResponse
s {$sel:version:CreateIntentVersionResponse' :: Maybe Text
version = Maybe Text
a} :: CreateIntentVersionResponse)

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

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

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

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

-- | If defined, the prompt that Amazon Lex uses to confirm the user\'s
-- intent before fulfilling it.
createIntentVersionResponse_confirmationPrompt :: Lens.Lens' CreateIntentVersionResponse (Prelude.Maybe Prompt)
createIntentVersionResponse_confirmationPrompt :: (Maybe Prompt -> f (Maybe Prompt))
-> CreateIntentVersionResponse -> f CreateIntentVersionResponse
createIntentVersionResponse_confirmationPrompt = (CreateIntentVersionResponse -> Maybe Prompt)
-> (CreateIntentVersionResponse
    -> Maybe Prompt -> CreateIntentVersionResponse)
-> Lens
     CreateIntentVersionResponse
     CreateIntentVersionResponse
     (Maybe Prompt)
     (Maybe Prompt)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntentVersionResponse' {Maybe Prompt
confirmationPrompt :: Maybe Prompt
$sel:confirmationPrompt:CreateIntentVersionResponse' :: CreateIntentVersionResponse -> Maybe Prompt
confirmationPrompt} -> Maybe Prompt
confirmationPrompt) (\s :: CreateIntentVersionResponse
s@CreateIntentVersionResponse' {} Maybe Prompt
a -> CreateIntentVersionResponse
s {$sel:confirmationPrompt:CreateIntentVersionResponse' :: Maybe Prompt
confirmationPrompt = Maybe Prompt
a} :: CreateIntentVersionResponse)

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

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

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

instance Prelude.NFData CreateIntentVersionResponse