{-# 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.LexV2Models.CreateBotAlias
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates an alias for the specified version of a bot. Use an alias to
-- enable you to change the version of a bot without updating applications
-- that use the bot.
--
-- For example, you can create an alias called \"PROD\" that your
-- applications use to call the Amazon Lex bot.
module Amazonka.LexV2Models.CreateBotAlias
  ( -- * Creating a Request
    CreateBotAlias (..),
    newCreateBotAlias,

    -- * Request Lenses
    createBotAlias_botAliasLocaleSettings,
    createBotAlias_botVersion,
    createBotAlias_conversationLogSettings,
    createBotAlias_description,
    createBotAlias_sentimentAnalysisSettings,
    createBotAlias_tags,
    createBotAlias_botAliasName,
    createBotAlias_botId,

    -- * Destructuring the Response
    CreateBotAliasResponse (..),
    newCreateBotAliasResponse,

    -- * Response Lenses
    createBotAliasResponse_botAliasId,
    createBotAliasResponse_botAliasLocaleSettings,
    createBotAliasResponse_botAliasName,
    createBotAliasResponse_botAliasStatus,
    createBotAliasResponse_botId,
    createBotAliasResponse_botVersion,
    createBotAliasResponse_conversationLogSettings,
    createBotAliasResponse_creationDateTime,
    createBotAliasResponse_description,
    createBotAliasResponse_sentimentAnalysisSettings,
    createBotAliasResponse_tags,
    createBotAliasResponse_httpStatus,
  )
where

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

-- | /See:/ 'newCreateBotAlias' smart constructor.
data CreateBotAlias = CreateBotAlias'
  { -- | Maps configuration information to a specific locale. You can use this
    -- parameter to specify a specific Lambda function to run different
    -- functions in different locales.
    CreateBotAlias -> Maybe (HashMap Text BotAliasLocaleSettings)
botAliasLocaleSettings :: Prelude.Maybe (Prelude.HashMap Prelude.Text BotAliasLocaleSettings),
    -- | The version of the bot that this alias points to. You can use the
    -- <https://docs.aws.amazon.com/lexv2/latest/dg/API_UpdateBotAlias.html UpdateBotAlias>
    -- operation to change the bot version associated with the alias.
    CreateBotAlias -> Maybe Text
botVersion :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether Amazon Lex logs text and audio for a conversation with
    -- the bot. When you enable conversation logs, text logs store text input,
    -- transcripts of audio input, and associated metadata in Amazon CloudWatch
    -- Logs. Audio logs store audio input in Amazon S3.
    CreateBotAlias -> Maybe ConversationLogSettings
conversationLogSettings :: Prelude.Maybe ConversationLogSettings,
    -- | A description of the alias. Use this description to help identify the
    -- alias.
    CreateBotAlias -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    CreateBotAlias -> Maybe SentimentAnalysisSettings
sentimentAnalysisSettings :: Prelude.Maybe SentimentAnalysisSettings,
    -- | A list of tags to add to the bot alias. You can only add tags when you
    -- create an alias, you can\'t use the @UpdateBotAlias@ operation to update
    -- the tags on a bot alias. To update tags, use the @TagResource@
    -- operation.
    CreateBotAlias -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The alias to create. The name must be unique for the bot.
    CreateBotAlias -> Text
botAliasName :: Prelude.Text,
    -- | The unique identifier of the bot that the alias applies to.
    CreateBotAlias -> Text
botId :: Prelude.Text
  }
  deriving (CreateBotAlias -> CreateBotAlias -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateBotAlias -> CreateBotAlias -> Bool
$c/= :: CreateBotAlias -> CreateBotAlias -> Bool
== :: CreateBotAlias -> CreateBotAlias -> Bool
$c== :: CreateBotAlias -> CreateBotAlias -> Bool
Prelude.Eq, ReadPrec [CreateBotAlias]
ReadPrec CreateBotAlias
Int -> ReadS CreateBotAlias
ReadS [CreateBotAlias]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateBotAlias]
$creadListPrec :: ReadPrec [CreateBotAlias]
readPrec :: ReadPrec CreateBotAlias
$creadPrec :: ReadPrec CreateBotAlias
readList :: ReadS [CreateBotAlias]
$creadList :: ReadS [CreateBotAlias]
readsPrec :: Int -> ReadS CreateBotAlias
$creadsPrec :: Int -> ReadS CreateBotAlias
Prelude.Read, Int -> CreateBotAlias -> ShowS
[CreateBotAlias] -> ShowS
CreateBotAlias -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateBotAlias] -> ShowS
$cshowList :: [CreateBotAlias] -> ShowS
show :: CreateBotAlias -> String
$cshow :: CreateBotAlias -> String
showsPrec :: Int -> CreateBotAlias -> ShowS
$cshowsPrec :: Int -> CreateBotAlias -> ShowS
Prelude.Show, forall x. Rep CreateBotAlias x -> CreateBotAlias
forall x. CreateBotAlias -> Rep CreateBotAlias x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateBotAlias x -> CreateBotAlias
$cfrom :: forall x. CreateBotAlias -> Rep CreateBotAlias x
Prelude.Generic)

-- |
-- Create a value of 'CreateBotAlias' 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:
--
-- 'botAliasLocaleSettings', 'createBotAlias_botAliasLocaleSettings' - Maps configuration information to a specific locale. You can use this
-- parameter to specify a specific Lambda function to run different
-- functions in different locales.
--
-- 'botVersion', 'createBotAlias_botVersion' - The version of the bot that this alias points to. You can use the
-- <https://docs.aws.amazon.com/lexv2/latest/dg/API_UpdateBotAlias.html UpdateBotAlias>
-- operation to change the bot version associated with the alias.
--
-- 'conversationLogSettings', 'createBotAlias_conversationLogSettings' - Specifies whether Amazon Lex logs text and audio for a conversation with
-- the bot. When you enable conversation logs, text logs store text input,
-- transcripts of audio input, and associated metadata in Amazon CloudWatch
-- Logs. Audio logs store audio input in Amazon S3.
--
-- 'description', 'createBotAlias_description' - A description of the alias. Use this description to help identify the
-- alias.
--
-- 'sentimentAnalysisSettings', 'createBotAlias_sentimentAnalysisSettings' - Undocumented member.
--
-- 'tags', 'createBotAlias_tags' - A list of tags to add to the bot alias. You can only add tags when you
-- create an alias, you can\'t use the @UpdateBotAlias@ operation to update
-- the tags on a bot alias. To update tags, use the @TagResource@
-- operation.
--
-- 'botAliasName', 'createBotAlias_botAliasName' - The alias to create. The name must be unique for the bot.
--
-- 'botId', 'createBotAlias_botId' - The unique identifier of the bot that the alias applies to.
newCreateBotAlias ::
  -- | 'botAliasName'
  Prelude.Text ->
  -- | 'botId'
  Prelude.Text ->
  CreateBotAlias
newCreateBotAlias :: Text -> Text -> CreateBotAlias
newCreateBotAlias Text
pBotAliasName_ Text
pBotId_ =
  CreateBotAlias'
    { $sel:botAliasLocaleSettings:CreateBotAlias' :: Maybe (HashMap Text BotAliasLocaleSettings)
botAliasLocaleSettings =
        forall a. Maybe a
Prelude.Nothing,
      $sel:botVersion:CreateBotAlias' :: Maybe Text
botVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:conversationLogSettings:CreateBotAlias' :: Maybe ConversationLogSettings
conversationLogSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateBotAlias' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:sentimentAnalysisSettings:CreateBotAlias' :: Maybe SentimentAnalysisSettings
sentimentAnalysisSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateBotAlias' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:botAliasName:CreateBotAlias' :: Text
botAliasName = Text
pBotAliasName_,
      $sel:botId:CreateBotAlias' :: Text
botId = Text
pBotId_
    }

-- | Maps configuration information to a specific locale. You can use this
-- parameter to specify a specific Lambda function to run different
-- functions in different locales.
createBotAlias_botAliasLocaleSettings :: Lens.Lens' CreateBotAlias (Prelude.Maybe (Prelude.HashMap Prelude.Text BotAliasLocaleSettings))
createBotAlias_botAliasLocaleSettings :: Lens' CreateBotAlias (Maybe (HashMap Text BotAliasLocaleSettings))
createBotAlias_botAliasLocaleSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBotAlias' {Maybe (HashMap Text BotAliasLocaleSettings)
botAliasLocaleSettings :: Maybe (HashMap Text BotAliasLocaleSettings)
$sel:botAliasLocaleSettings:CreateBotAlias' :: CreateBotAlias -> Maybe (HashMap Text BotAliasLocaleSettings)
botAliasLocaleSettings} -> Maybe (HashMap Text BotAliasLocaleSettings)
botAliasLocaleSettings) (\s :: CreateBotAlias
s@CreateBotAlias' {} Maybe (HashMap Text BotAliasLocaleSettings)
a -> CreateBotAlias
s {$sel:botAliasLocaleSettings:CreateBotAlias' :: Maybe (HashMap Text BotAliasLocaleSettings)
botAliasLocaleSettings = Maybe (HashMap Text BotAliasLocaleSettings)
a} :: CreateBotAlias) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The version of the bot that this alias points to. You can use the
-- <https://docs.aws.amazon.com/lexv2/latest/dg/API_UpdateBotAlias.html UpdateBotAlias>
-- operation to change the bot version associated with the alias.
createBotAlias_botVersion :: Lens.Lens' CreateBotAlias (Prelude.Maybe Prelude.Text)
createBotAlias_botVersion :: Lens' CreateBotAlias (Maybe Text)
createBotAlias_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBotAlias' {Maybe Text
botVersion :: Maybe Text
$sel:botVersion:CreateBotAlias' :: CreateBotAlias -> Maybe Text
botVersion} -> Maybe Text
botVersion) (\s :: CreateBotAlias
s@CreateBotAlias' {} Maybe Text
a -> CreateBotAlias
s {$sel:botVersion:CreateBotAlias' :: Maybe Text
botVersion = Maybe Text
a} :: CreateBotAlias)

-- | Specifies whether Amazon Lex logs text and audio for a conversation with
-- the bot. When you enable conversation logs, text logs store text input,
-- transcripts of audio input, and associated metadata in Amazon CloudWatch
-- Logs. Audio logs store audio input in Amazon S3.
createBotAlias_conversationLogSettings :: Lens.Lens' CreateBotAlias (Prelude.Maybe ConversationLogSettings)
createBotAlias_conversationLogSettings :: Lens' CreateBotAlias (Maybe ConversationLogSettings)
createBotAlias_conversationLogSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBotAlias' {Maybe ConversationLogSettings
conversationLogSettings :: Maybe ConversationLogSettings
$sel:conversationLogSettings:CreateBotAlias' :: CreateBotAlias -> Maybe ConversationLogSettings
conversationLogSettings} -> Maybe ConversationLogSettings
conversationLogSettings) (\s :: CreateBotAlias
s@CreateBotAlias' {} Maybe ConversationLogSettings
a -> CreateBotAlias
s {$sel:conversationLogSettings:CreateBotAlias' :: Maybe ConversationLogSettings
conversationLogSettings = Maybe ConversationLogSettings
a} :: CreateBotAlias)

-- | A description of the alias. Use this description to help identify the
-- alias.
createBotAlias_description :: Lens.Lens' CreateBotAlias (Prelude.Maybe Prelude.Text)
createBotAlias_description :: Lens' CreateBotAlias (Maybe Text)
createBotAlias_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBotAlias' {Maybe Text
description :: Maybe Text
$sel:description:CreateBotAlias' :: CreateBotAlias -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateBotAlias
s@CreateBotAlias' {} Maybe Text
a -> CreateBotAlias
s {$sel:description:CreateBotAlias' :: Maybe Text
description = Maybe Text
a} :: CreateBotAlias)

-- | Undocumented member.
createBotAlias_sentimentAnalysisSettings :: Lens.Lens' CreateBotAlias (Prelude.Maybe SentimentAnalysisSettings)
createBotAlias_sentimentAnalysisSettings :: Lens' CreateBotAlias (Maybe SentimentAnalysisSettings)
createBotAlias_sentimentAnalysisSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBotAlias' {Maybe SentimentAnalysisSettings
sentimentAnalysisSettings :: Maybe SentimentAnalysisSettings
$sel:sentimentAnalysisSettings:CreateBotAlias' :: CreateBotAlias -> Maybe SentimentAnalysisSettings
sentimentAnalysisSettings} -> Maybe SentimentAnalysisSettings
sentimentAnalysisSettings) (\s :: CreateBotAlias
s@CreateBotAlias' {} Maybe SentimentAnalysisSettings
a -> CreateBotAlias
s {$sel:sentimentAnalysisSettings:CreateBotAlias' :: Maybe SentimentAnalysisSettings
sentimentAnalysisSettings = Maybe SentimentAnalysisSettings
a} :: CreateBotAlias)

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

-- | The alias to create. The name must be unique for the bot.
createBotAlias_botAliasName :: Lens.Lens' CreateBotAlias Prelude.Text
createBotAlias_botAliasName :: Lens' CreateBotAlias Text
createBotAlias_botAliasName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBotAlias' {Text
botAliasName :: Text
$sel:botAliasName:CreateBotAlias' :: CreateBotAlias -> Text
botAliasName} -> Text
botAliasName) (\s :: CreateBotAlias
s@CreateBotAlias' {} Text
a -> CreateBotAlias
s {$sel:botAliasName:CreateBotAlias' :: Text
botAliasName = Text
a} :: CreateBotAlias)

-- | The unique identifier of the bot that the alias applies to.
createBotAlias_botId :: Lens.Lens' CreateBotAlias Prelude.Text
createBotAlias_botId :: Lens' CreateBotAlias Text
createBotAlias_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBotAlias' {Text
botId :: Text
$sel:botId:CreateBotAlias' :: CreateBotAlias -> Text
botId} -> Text
botId) (\s :: CreateBotAlias
s@CreateBotAlias' {} Text
a -> CreateBotAlias
s {$sel:botId:CreateBotAlias' :: Text
botId = Text
a} :: CreateBotAlias)

instance Core.AWSRequest CreateBotAlias where
  type
    AWSResponse CreateBotAlias =
      CreateBotAliasResponse
  request :: (Service -> Service) -> CreateBotAlias -> Request CreateBotAlias
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateBotAlias
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateBotAlias)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe (HashMap Text BotAliasLocaleSettings)
-> Maybe Text
-> Maybe BotAliasStatus
-> Maybe Text
-> Maybe Text
-> Maybe ConversationLogSettings
-> Maybe POSIX
-> Maybe Text
-> Maybe SentimentAnalysisSettings
-> Maybe (HashMap Text Text)
-> Int
-> CreateBotAliasResponse
CreateBotAliasResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"botAliasId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"botAliasLocaleSettings"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"botAliasName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"botAliasStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"botId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"botVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"conversationLogSettings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"creationDateTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"sentimentAnalysisSettings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateBotAlias where
  hashWithSalt :: Int -> CreateBotAlias -> Int
hashWithSalt Int
_salt CreateBotAlias' {Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text BotAliasLocaleSettings)
Maybe SentimentAnalysisSettings
Maybe ConversationLogSettings
Text
botId :: Text
botAliasName :: Text
tags :: Maybe (HashMap Text Text)
sentimentAnalysisSettings :: Maybe SentimentAnalysisSettings
description :: Maybe Text
conversationLogSettings :: Maybe ConversationLogSettings
botVersion :: Maybe Text
botAliasLocaleSettings :: Maybe (HashMap Text BotAliasLocaleSettings)
$sel:botId:CreateBotAlias' :: CreateBotAlias -> Text
$sel:botAliasName:CreateBotAlias' :: CreateBotAlias -> Text
$sel:tags:CreateBotAlias' :: CreateBotAlias -> Maybe (HashMap Text Text)
$sel:sentimentAnalysisSettings:CreateBotAlias' :: CreateBotAlias -> Maybe SentimentAnalysisSettings
$sel:description:CreateBotAlias' :: CreateBotAlias -> Maybe Text
$sel:conversationLogSettings:CreateBotAlias' :: CreateBotAlias -> Maybe ConversationLogSettings
$sel:botVersion:CreateBotAlias' :: CreateBotAlias -> Maybe Text
$sel:botAliasLocaleSettings:CreateBotAlias' :: CreateBotAlias -> Maybe (HashMap Text BotAliasLocaleSettings)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text BotAliasLocaleSettings)
botAliasLocaleSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
botVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConversationLogSettings
conversationLogSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SentimentAnalysisSettings
sentimentAnalysisSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
botAliasName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
botId

instance Prelude.NFData CreateBotAlias where
  rnf :: CreateBotAlias -> ()
rnf CreateBotAlias' {Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text BotAliasLocaleSettings)
Maybe SentimentAnalysisSettings
Maybe ConversationLogSettings
Text
botId :: Text
botAliasName :: Text
tags :: Maybe (HashMap Text Text)
sentimentAnalysisSettings :: Maybe SentimentAnalysisSettings
description :: Maybe Text
conversationLogSettings :: Maybe ConversationLogSettings
botVersion :: Maybe Text
botAliasLocaleSettings :: Maybe (HashMap Text BotAliasLocaleSettings)
$sel:botId:CreateBotAlias' :: CreateBotAlias -> Text
$sel:botAliasName:CreateBotAlias' :: CreateBotAlias -> Text
$sel:tags:CreateBotAlias' :: CreateBotAlias -> Maybe (HashMap Text Text)
$sel:sentimentAnalysisSettings:CreateBotAlias' :: CreateBotAlias -> Maybe SentimentAnalysisSettings
$sel:description:CreateBotAlias' :: CreateBotAlias -> Maybe Text
$sel:conversationLogSettings:CreateBotAlias' :: CreateBotAlias -> Maybe ConversationLogSettings
$sel:botVersion:CreateBotAlias' :: CreateBotAlias -> Maybe Text
$sel:botAliasLocaleSettings:CreateBotAlias' :: CreateBotAlias -> Maybe (HashMap Text BotAliasLocaleSettings)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text BotAliasLocaleSettings)
botAliasLocaleSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
botVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConversationLogSettings
conversationLogSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SentimentAnalysisSettings
sentimentAnalysisSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
botAliasName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
botId

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

instance Data.ToJSON CreateBotAlias where
  toJSON :: CreateBotAlias -> Value
toJSON CreateBotAlias' {Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text BotAliasLocaleSettings)
Maybe SentimentAnalysisSettings
Maybe ConversationLogSettings
Text
botId :: Text
botAliasName :: Text
tags :: Maybe (HashMap Text Text)
sentimentAnalysisSettings :: Maybe SentimentAnalysisSettings
description :: Maybe Text
conversationLogSettings :: Maybe ConversationLogSettings
botVersion :: Maybe Text
botAliasLocaleSettings :: Maybe (HashMap Text BotAliasLocaleSettings)
$sel:botId:CreateBotAlias' :: CreateBotAlias -> Text
$sel:botAliasName:CreateBotAlias' :: CreateBotAlias -> Text
$sel:tags:CreateBotAlias' :: CreateBotAlias -> Maybe (HashMap Text Text)
$sel:sentimentAnalysisSettings:CreateBotAlias' :: CreateBotAlias -> Maybe SentimentAnalysisSettings
$sel:description:CreateBotAlias' :: CreateBotAlias -> Maybe Text
$sel:conversationLogSettings:CreateBotAlias' :: CreateBotAlias -> Maybe ConversationLogSettings
$sel:botVersion:CreateBotAlias' :: CreateBotAlias -> Maybe Text
$sel:botAliasLocaleSettings:CreateBotAlias' :: CreateBotAlias -> Maybe (HashMap Text BotAliasLocaleSettings)
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"botAliasLocaleSettings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text BotAliasLocaleSettings)
botAliasLocaleSettings,
            (Key
"botVersion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
botVersion,
            (Key
"conversationLogSettings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConversationLogSettings
conversationLogSettings,
            (Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Key
"sentimentAnalysisSettings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SentimentAnalysisSettings
sentimentAnalysisSettings,
            (Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            forall a. a -> Maybe a
Prelude.Just (Key
"botAliasName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
botAliasName)
          ]
      )

instance Data.ToPath CreateBotAlias where
  toPath :: CreateBotAlias -> ByteString
toPath CreateBotAlias' {Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text BotAliasLocaleSettings)
Maybe SentimentAnalysisSettings
Maybe ConversationLogSettings
Text
botId :: Text
botAliasName :: Text
tags :: Maybe (HashMap Text Text)
sentimentAnalysisSettings :: Maybe SentimentAnalysisSettings
description :: Maybe Text
conversationLogSettings :: Maybe ConversationLogSettings
botVersion :: Maybe Text
botAliasLocaleSettings :: Maybe (HashMap Text BotAliasLocaleSettings)
$sel:botId:CreateBotAlias' :: CreateBotAlias -> Text
$sel:botAliasName:CreateBotAlias' :: CreateBotAlias -> Text
$sel:tags:CreateBotAlias' :: CreateBotAlias -> Maybe (HashMap Text Text)
$sel:sentimentAnalysisSettings:CreateBotAlias' :: CreateBotAlias -> Maybe SentimentAnalysisSettings
$sel:description:CreateBotAlias' :: CreateBotAlias -> Maybe Text
$sel:conversationLogSettings:CreateBotAlias' :: CreateBotAlias -> Maybe ConversationLogSettings
$sel:botVersion:CreateBotAlias' :: CreateBotAlias -> Maybe Text
$sel:botAliasLocaleSettings:CreateBotAlias' :: CreateBotAlias -> Maybe (HashMap Text BotAliasLocaleSettings)
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/bots/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
botId, ByteString
"/botaliases/"]

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

-- | /See:/ 'newCreateBotAliasResponse' smart constructor.
data CreateBotAliasResponse = CreateBotAliasResponse'
  { -- | The unique identifier of the bot alias.
    CreateBotAliasResponse -> Maybe Text
botAliasId :: Prelude.Maybe Prelude.Text,
    -- | Configuration information for a specific locale.
    CreateBotAliasResponse
-> Maybe (HashMap Text BotAliasLocaleSettings)
botAliasLocaleSettings :: Prelude.Maybe (Prelude.HashMap Prelude.Text BotAliasLocaleSettings),
    -- | The name specified for the bot alias.
    CreateBotAliasResponse -> Maybe Text
botAliasName :: Prelude.Maybe Prelude.Text,
    -- | The current status of the alias. The alias is first put into the
    -- @Creating@ state. When the alias is ready to be used, it is put into the
    -- @Available@ state. You can use the @DescribeBotAlias@ operation to get
    -- the current state of an alias.
    CreateBotAliasResponse -> Maybe BotAliasStatus
botAliasStatus :: Prelude.Maybe BotAliasStatus,
    -- | The unique identifier of the bot that this alias applies to.
    CreateBotAliasResponse -> Maybe Text
botId :: Prelude.Maybe Prelude.Text,
    -- | The version of the bot associated with this alias.
    CreateBotAliasResponse -> Maybe Text
botVersion :: Prelude.Maybe Prelude.Text,
    -- | The conversation log settings specified for the alias.
    CreateBotAliasResponse -> Maybe ConversationLogSettings
conversationLogSettings :: Prelude.Maybe ConversationLogSettings,
    -- | A Unix timestamp indicating the date and time that the bot alias was
    -- created.
    CreateBotAliasResponse -> Maybe POSIX
creationDateTime :: Prelude.Maybe Data.POSIX,
    -- | The description specified for the bot alias.
    CreateBotAliasResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    CreateBotAliasResponse -> Maybe SentimentAnalysisSettings
sentimentAnalysisSettings :: Prelude.Maybe SentimentAnalysisSettings,
    -- | A list of tags associated with the bot alias.
    CreateBotAliasResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    CreateBotAliasResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateBotAliasResponse -> CreateBotAliasResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateBotAliasResponse -> CreateBotAliasResponse -> Bool
$c/= :: CreateBotAliasResponse -> CreateBotAliasResponse -> Bool
== :: CreateBotAliasResponse -> CreateBotAliasResponse -> Bool
$c== :: CreateBotAliasResponse -> CreateBotAliasResponse -> Bool
Prelude.Eq, ReadPrec [CreateBotAliasResponse]
ReadPrec CreateBotAliasResponse
Int -> ReadS CreateBotAliasResponse
ReadS [CreateBotAliasResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateBotAliasResponse]
$creadListPrec :: ReadPrec [CreateBotAliasResponse]
readPrec :: ReadPrec CreateBotAliasResponse
$creadPrec :: ReadPrec CreateBotAliasResponse
readList :: ReadS [CreateBotAliasResponse]
$creadList :: ReadS [CreateBotAliasResponse]
readsPrec :: Int -> ReadS CreateBotAliasResponse
$creadsPrec :: Int -> ReadS CreateBotAliasResponse
Prelude.Read, Int -> CreateBotAliasResponse -> ShowS
[CreateBotAliasResponse] -> ShowS
CreateBotAliasResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateBotAliasResponse] -> ShowS
$cshowList :: [CreateBotAliasResponse] -> ShowS
show :: CreateBotAliasResponse -> String
$cshow :: CreateBotAliasResponse -> String
showsPrec :: Int -> CreateBotAliasResponse -> ShowS
$cshowsPrec :: Int -> CreateBotAliasResponse -> ShowS
Prelude.Show, forall x. Rep CreateBotAliasResponse x -> CreateBotAliasResponse
forall x. CreateBotAliasResponse -> Rep CreateBotAliasResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateBotAliasResponse x -> CreateBotAliasResponse
$cfrom :: forall x. CreateBotAliasResponse -> Rep CreateBotAliasResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateBotAliasResponse' 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:
--
-- 'botAliasId', 'createBotAliasResponse_botAliasId' - The unique identifier of the bot alias.
--
-- 'botAliasLocaleSettings', 'createBotAliasResponse_botAliasLocaleSettings' - Configuration information for a specific locale.
--
-- 'botAliasName', 'createBotAliasResponse_botAliasName' - The name specified for the bot alias.
--
-- 'botAliasStatus', 'createBotAliasResponse_botAliasStatus' - The current status of the alias. The alias is first put into the
-- @Creating@ state. When the alias is ready to be used, it is put into the
-- @Available@ state. You can use the @DescribeBotAlias@ operation to get
-- the current state of an alias.
--
-- 'botId', 'createBotAliasResponse_botId' - The unique identifier of the bot that this alias applies to.
--
-- 'botVersion', 'createBotAliasResponse_botVersion' - The version of the bot associated with this alias.
--
-- 'conversationLogSettings', 'createBotAliasResponse_conversationLogSettings' - The conversation log settings specified for the alias.
--
-- 'creationDateTime', 'createBotAliasResponse_creationDateTime' - A Unix timestamp indicating the date and time that the bot alias was
-- created.
--
-- 'description', 'createBotAliasResponse_description' - The description specified for the bot alias.
--
-- 'sentimentAnalysisSettings', 'createBotAliasResponse_sentimentAnalysisSettings' - Undocumented member.
--
-- 'tags', 'createBotAliasResponse_tags' - A list of tags associated with the bot alias.
--
-- 'httpStatus', 'createBotAliasResponse_httpStatus' - The response's http status code.
newCreateBotAliasResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateBotAliasResponse
newCreateBotAliasResponse :: Int -> CreateBotAliasResponse
newCreateBotAliasResponse Int
pHttpStatus_ =
  CreateBotAliasResponse'
    { $sel:botAliasId:CreateBotAliasResponse' :: Maybe Text
botAliasId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:botAliasLocaleSettings:CreateBotAliasResponse' :: Maybe (HashMap Text BotAliasLocaleSettings)
botAliasLocaleSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:botAliasName:CreateBotAliasResponse' :: Maybe Text
botAliasName = forall a. Maybe a
Prelude.Nothing,
      $sel:botAliasStatus:CreateBotAliasResponse' :: Maybe BotAliasStatus
botAliasStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:botId:CreateBotAliasResponse' :: Maybe Text
botId = forall a. Maybe a
Prelude.Nothing,
      $sel:botVersion:CreateBotAliasResponse' :: Maybe Text
botVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:conversationLogSettings:CreateBotAliasResponse' :: Maybe ConversationLogSettings
conversationLogSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:creationDateTime:CreateBotAliasResponse' :: Maybe POSIX
creationDateTime = forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateBotAliasResponse' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:sentimentAnalysisSettings:CreateBotAliasResponse' :: Maybe SentimentAnalysisSettings
sentimentAnalysisSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateBotAliasResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateBotAliasResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The unique identifier of the bot alias.
createBotAliasResponse_botAliasId :: Lens.Lens' CreateBotAliasResponse (Prelude.Maybe Prelude.Text)
createBotAliasResponse_botAliasId :: Lens' CreateBotAliasResponse (Maybe Text)
createBotAliasResponse_botAliasId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBotAliasResponse' {Maybe Text
botAliasId :: Maybe Text
$sel:botAliasId:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe Text
botAliasId} -> Maybe Text
botAliasId) (\s :: CreateBotAliasResponse
s@CreateBotAliasResponse' {} Maybe Text
a -> CreateBotAliasResponse
s {$sel:botAliasId:CreateBotAliasResponse' :: Maybe Text
botAliasId = Maybe Text
a} :: CreateBotAliasResponse)

-- | Configuration information for a specific locale.
createBotAliasResponse_botAliasLocaleSettings :: Lens.Lens' CreateBotAliasResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text BotAliasLocaleSettings))
createBotAliasResponse_botAliasLocaleSettings :: Lens'
  CreateBotAliasResponse
  (Maybe (HashMap Text BotAliasLocaleSettings))
createBotAliasResponse_botAliasLocaleSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBotAliasResponse' {Maybe (HashMap Text BotAliasLocaleSettings)
botAliasLocaleSettings :: Maybe (HashMap Text BotAliasLocaleSettings)
$sel:botAliasLocaleSettings:CreateBotAliasResponse' :: CreateBotAliasResponse
-> Maybe (HashMap Text BotAliasLocaleSettings)
botAliasLocaleSettings} -> Maybe (HashMap Text BotAliasLocaleSettings)
botAliasLocaleSettings) (\s :: CreateBotAliasResponse
s@CreateBotAliasResponse' {} Maybe (HashMap Text BotAliasLocaleSettings)
a -> CreateBotAliasResponse
s {$sel:botAliasLocaleSettings:CreateBotAliasResponse' :: Maybe (HashMap Text BotAliasLocaleSettings)
botAliasLocaleSettings = Maybe (HashMap Text BotAliasLocaleSettings)
a} :: CreateBotAliasResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name specified for the bot alias.
createBotAliasResponse_botAliasName :: Lens.Lens' CreateBotAliasResponse (Prelude.Maybe Prelude.Text)
createBotAliasResponse_botAliasName :: Lens' CreateBotAliasResponse (Maybe Text)
createBotAliasResponse_botAliasName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBotAliasResponse' {Maybe Text
botAliasName :: Maybe Text
$sel:botAliasName:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe Text
botAliasName} -> Maybe Text
botAliasName) (\s :: CreateBotAliasResponse
s@CreateBotAliasResponse' {} Maybe Text
a -> CreateBotAliasResponse
s {$sel:botAliasName:CreateBotAliasResponse' :: Maybe Text
botAliasName = Maybe Text
a} :: CreateBotAliasResponse)

-- | The current status of the alias. The alias is first put into the
-- @Creating@ state. When the alias is ready to be used, it is put into the
-- @Available@ state. You can use the @DescribeBotAlias@ operation to get
-- the current state of an alias.
createBotAliasResponse_botAliasStatus :: Lens.Lens' CreateBotAliasResponse (Prelude.Maybe BotAliasStatus)
createBotAliasResponse_botAliasStatus :: Lens' CreateBotAliasResponse (Maybe BotAliasStatus)
createBotAliasResponse_botAliasStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBotAliasResponse' {Maybe BotAliasStatus
botAliasStatus :: Maybe BotAliasStatus
$sel:botAliasStatus:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe BotAliasStatus
botAliasStatus} -> Maybe BotAliasStatus
botAliasStatus) (\s :: CreateBotAliasResponse
s@CreateBotAliasResponse' {} Maybe BotAliasStatus
a -> CreateBotAliasResponse
s {$sel:botAliasStatus:CreateBotAliasResponse' :: Maybe BotAliasStatus
botAliasStatus = Maybe BotAliasStatus
a} :: CreateBotAliasResponse)

-- | The unique identifier of the bot that this alias applies to.
createBotAliasResponse_botId :: Lens.Lens' CreateBotAliasResponse (Prelude.Maybe Prelude.Text)
createBotAliasResponse_botId :: Lens' CreateBotAliasResponse (Maybe Text)
createBotAliasResponse_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBotAliasResponse' {Maybe Text
botId :: Maybe Text
$sel:botId:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe Text
botId} -> Maybe Text
botId) (\s :: CreateBotAliasResponse
s@CreateBotAliasResponse' {} Maybe Text
a -> CreateBotAliasResponse
s {$sel:botId:CreateBotAliasResponse' :: Maybe Text
botId = Maybe Text
a} :: CreateBotAliasResponse)

-- | The version of the bot associated with this alias.
createBotAliasResponse_botVersion :: Lens.Lens' CreateBotAliasResponse (Prelude.Maybe Prelude.Text)
createBotAliasResponse_botVersion :: Lens' CreateBotAliasResponse (Maybe Text)
createBotAliasResponse_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBotAliasResponse' {Maybe Text
botVersion :: Maybe Text
$sel:botVersion:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe Text
botVersion} -> Maybe Text
botVersion) (\s :: CreateBotAliasResponse
s@CreateBotAliasResponse' {} Maybe Text
a -> CreateBotAliasResponse
s {$sel:botVersion:CreateBotAliasResponse' :: Maybe Text
botVersion = Maybe Text
a} :: CreateBotAliasResponse)

-- | The conversation log settings specified for the alias.
createBotAliasResponse_conversationLogSettings :: Lens.Lens' CreateBotAliasResponse (Prelude.Maybe ConversationLogSettings)
createBotAliasResponse_conversationLogSettings :: Lens' CreateBotAliasResponse (Maybe ConversationLogSettings)
createBotAliasResponse_conversationLogSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBotAliasResponse' {Maybe ConversationLogSettings
conversationLogSettings :: Maybe ConversationLogSettings
$sel:conversationLogSettings:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe ConversationLogSettings
conversationLogSettings} -> Maybe ConversationLogSettings
conversationLogSettings) (\s :: CreateBotAliasResponse
s@CreateBotAliasResponse' {} Maybe ConversationLogSettings
a -> CreateBotAliasResponse
s {$sel:conversationLogSettings:CreateBotAliasResponse' :: Maybe ConversationLogSettings
conversationLogSettings = Maybe ConversationLogSettings
a} :: CreateBotAliasResponse)

-- | A Unix timestamp indicating the date and time that the bot alias was
-- created.
createBotAliasResponse_creationDateTime :: Lens.Lens' CreateBotAliasResponse (Prelude.Maybe Prelude.UTCTime)
createBotAliasResponse_creationDateTime :: Lens' CreateBotAliasResponse (Maybe UTCTime)
createBotAliasResponse_creationDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBotAliasResponse' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: CreateBotAliasResponse
s@CreateBotAliasResponse' {} Maybe POSIX
a -> CreateBotAliasResponse
s {$sel:creationDateTime:CreateBotAliasResponse' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: CreateBotAliasResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The description specified for the bot alias.
createBotAliasResponse_description :: Lens.Lens' CreateBotAliasResponse (Prelude.Maybe Prelude.Text)
createBotAliasResponse_description :: Lens' CreateBotAliasResponse (Maybe Text)
createBotAliasResponse_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBotAliasResponse' {Maybe Text
description :: Maybe Text
$sel:description:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateBotAliasResponse
s@CreateBotAliasResponse' {} Maybe Text
a -> CreateBotAliasResponse
s {$sel:description:CreateBotAliasResponse' :: Maybe Text
description = Maybe Text
a} :: CreateBotAliasResponse)

-- | Undocumented member.
createBotAliasResponse_sentimentAnalysisSettings :: Lens.Lens' CreateBotAliasResponse (Prelude.Maybe SentimentAnalysisSettings)
createBotAliasResponse_sentimentAnalysisSettings :: Lens' CreateBotAliasResponse (Maybe SentimentAnalysisSettings)
createBotAliasResponse_sentimentAnalysisSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBotAliasResponse' {Maybe SentimentAnalysisSettings
sentimentAnalysisSettings :: Maybe SentimentAnalysisSettings
$sel:sentimentAnalysisSettings:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe SentimentAnalysisSettings
sentimentAnalysisSettings} -> Maybe SentimentAnalysisSettings
sentimentAnalysisSettings) (\s :: CreateBotAliasResponse
s@CreateBotAliasResponse' {} Maybe SentimentAnalysisSettings
a -> CreateBotAliasResponse
s {$sel:sentimentAnalysisSettings:CreateBotAliasResponse' :: Maybe SentimentAnalysisSettings
sentimentAnalysisSettings = Maybe SentimentAnalysisSettings
a} :: CreateBotAliasResponse)

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

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

instance Prelude.NFData CreateBotAliasResponse where
  rnf :: CreateBotAliasResponse -> ()
rnf CreateBotAliasResponse' {Int
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text BotAliasLocaleSettings)
Maybe POSIX
Maybe BotAliasStatus
Maybe SentimentAnalysisSettings
Maybe ConversationLogSettings
httpStatus :: Int
tags :: Maybe (HashMap Text Text)
sentimentAnalysisSettings :: Maybe SentimentAnalysisSettings
description :: Maybe Text
creationDateTime :: Maybe POSIX
conversationLogSettings :: Maybe ConversationLogSettings
botVersion :: Maybe Text
botId :: Maybe Text
botAliasStatus :: Maybe BotAliasStatus
botAliasName :: Maybe Text
botAliasLocaleSettings :: Maybe (HashMap Text BotAliasLocaleSettings)
botAliasId :: Maybe Text
$sel:httpStatus:CreateBotAliasResponse' :: CreateBotAliasResponse -> Int
$sel:tags:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe (HashMap Text Text)
$sel:sentimentAnalysisSettings:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe SentimentAnalysisSettings
$sel:description:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe Text
$sel:creationDateTime:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe POSIX
$sel:conversationLogSettings:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe ConversationLogSettings
$sel:botVersion:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe Text
$sel:botId:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe Text
$sel:botAliasStatus:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe BotAliasStatus
$sel:botAliasName:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe Text
$sel:botAliasLocaleSettings:CreateBotAliasResponse' :: CreateBotAliasResponse
-> Maybe (HashMap Text BotAliasLocaleSettings)
$sel:botAliasId:CreateBotAliasResponse' :: CreateBotAliasResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
botAliasId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text BotAliasLocaleSettings)
botAliasLocaleSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
botAliasName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe BotAliasStatus
botAliasStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
botId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
botVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConversationLogSettings
conversationLogSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationDateTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SentimentAnalysisSettings
sentimentAnalysisSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus