{-# 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.GetBotAlias
-- 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)
--
-- Returns information about an Amazon Lex bot alias. For more information
-- about aliases, see versioning-aliases.
--
-- This operation requires permissions for the @lex:GetBotAlias@ action.
module Amazonka.LexModels.GetBotAlias
  ( -- * Creating a Request
    GetBotAlias (..),
    newGetBotAlias,

    -- * Request Lenses
    getBotAlias_name,
    getBotAlias_botName,

    -- * Destructuring the Response
    GetBotAliasResponse (..),
    newGetBotAliasResponse,

    -- * Response Lenses
    getBotAliasResponse_checksum,
    getBotAliasResponse_botVersion,
    getBotAliasResponse_botName,
    getBotAliasResponse_createdDate,
    getBotAliasResponse_name,
    getBotAliasResponse_conversationLogs,
    getBotAliasResponse_lastUpdatedDate,
    getBotAliasResponse_description,
    getBotAliasResponse_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:/ 'newGetBotAlias' smart constructor.
data GetBotAlias = GetBotAlias'
  { -- | The name of the bot alias. The name is case sensitive.
    GetBotAlias -> Text
name :: Prelude.Text,
    -- | The name of the bot.
    GetBotAlias -> Text
botName :: Prelude.Text
  }
  deriving (GetBotAlias -> GetBotAlias -> Bool
(GetBotAlias -> GetBotAlias -> Bool)
-> (GetBotAlias -> GetBotAlias -> Bool) -> Eq GetBotAlias
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBotAlias -> GetBotAlias -> Bool
$c/= :: GetBotAlias -> GetBotAlias -> Bool
== :: GetBotAlias -> GetBotAlias -> Bool
$c== :: GetBotAlias -> GetBotAlias -> Bool
Prelude.Eq, ReadPrec [GetBotAlias]
ReadPrec GetBotAlias
Int -> ReadS GetBotAlias
ReadS [GetBotAlias]
(Int -> ReadS GetBotAlias)
-> ReadS [GetBotAlias]
-> ReadPrec GetBotAlias
-> ReadPrec [GetBotAlias]
-> Read GetBotAlias
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBotAlias]
$creadListPrec :: ReadPrec [GetBotAlias]
readPrec :: ReadPrec GetBotAlias
$creadPrec :: ReadPrec GetBotAlias
readList :: ReadS [GetBotAlias]
$creadList :: ReadS [GetBotAlias]
readsPrec :: Int -> ReadS GetBotAlias
$creadsPrec :: Int -> ReadS GetBotAlias
Prelude.Read, Int -> GetBotAlias -> ShowS
[GetBotAlias] -> ShowS
GetBotAlias -> String
(Int -> GetBotAlias -> ShowS)
-> (GetBotAlias -> String)
-> ([GetBotAlias] -> ShowS)
-> Show GetBotAlias
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBotAlias] -> ShowS
$cshowList :: [GetBotAlias] -> ShowS
show :: GetBotAlias -> String
$cshow :: GetBotAlias -> String
showsPrec :: Int -> GetBotAlias -> ShowS
$cshowsPrec :: Int -> GetBotAlias -> ShowS
Prelude.Show, (forall x. GetBotAlias -> Rep GetBotAlias x)
-> (forall x. Rep GetBotAlias x -> GetBotAlias)
-> Generic GetBotAlias
forall x. Rep GetBotAlias x -> GetBotAlias
forall x. GetBotAlias -> Rep GetBotAlias x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetBotAlias x -> GetBotAlias
$cfrom :: forall x. GetBotAlias -> Rep GetBotAlias x
Prelude.Generic)

-- |
-- Create a value of 'GetBotAlias' 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:
--
-- 'name', 'getBotAlias_name' - The name of the bot alias. The name is case sensitive.
--
-- 'botName', 'getBotAlias_botName' - The name of the bot.
newGetBotAlias ::
  -- | 'name'
  Prelude.Text ->
  -- | 'botName'
  Prelude.Text ->
  GetBotAlias
newGetBotAlias :: Text -> Text -> GetBotAlias
newGetBotAlias Text
pName_ Text
pBotName_ =
  GetBotAlias' :: Text -> Text -> GetBotAlias
GetBotAlias' {$sel:name:GetBotAlias' :: Text
name = Text
pName_, $sel:botName:GetBotAlias' :: Text
botName = Text
pBotName_}

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

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

instance Core.AWSRequest GetBotAlias where
  type AWSResponse GetBotAlias = GetBotAliasResponse
  request :: GetBotAlias -> Request GetBotAlias
request = Service -> GetBotAlias -> Request GetBotAlias
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetBotAlias
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetBotAlias)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetBotAlias))
-> Logger
-> Service
-> Proxy GetBotAlias
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetBotAlias)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ConversationLogsResponse
-> Maybe POSIX
-> Maybe Text
-> Int
-> GetBotAliasResponse
GetBotAliasResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe ConversationLogsResponse
 -> Maybe POSIX
 -> Maybe Text
 -> Int
 -> GetBotAliasResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ConversationLogsResponse
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> GetBotAliasResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"checksum")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe ConversationLogsResponse
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> GetBotAliasResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ConversationLogsResponse
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> GetBotAliasResponse)
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
"botVersion")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe ConversationLogsResponse
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> GetBotAliasResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe ConversationLogsResponse
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> GetBotAliasResponse)
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
"botName")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe ConversationLogsResponse
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> GetBotAliasResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe ConversationLogsResponse
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> GetBotAliasResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"createdDate")
            Either
  String
  (Maybe Text
   -> Maybe ConversationLogsResponse
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> GetBotAliasResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ConversationLogsResponse
      -> Maybe POSIX -> Maybe Text -> Int -> GetBotAliasResponse)
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 ConversationLogsResponse
   -> Maybe POSIX -> Maybe Text -> Int -> GetBotAliasResponse)
-> Either String (Maybe ConversationLogsResponse)
-> Either
     String (Maybe POSIX -> Maybe Text -> Int -> GetBotAliasResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ConversationLogsResponse)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"conversationLogs")
            Either
  String (Maybe POSIX -> Maybe Text -> Int -> GetBotAliasResponse)
-> Either String (Maybe POSIX)
-> Either String (Maybe Text -> Int -> GetBotAliasResponse)
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 Text -> Int -> GetBotAliasResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetBotAliasResponse)
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 -> GetBotAliasResponse)
-> Either String Int -> Either String GetBotAliasResponse
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 GetBotAlias

instance Prelude.NFData GetBotAlias

instance Core.ToHeaders GetBotAlias where
  toHeaders :: GetBotAlias -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetBotAlias -> 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.ToPath GetBotAlias where
  toPath :: GetBotAlias -> ByteString
toPath GetBotAlias' {Text
botName :: Text
name :: Text
$sel:botName:GetBotAlias' :: GetBotAlias -> Text
$sel:name:GetBotAlias' :: GetBotAlias -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/bots/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
botName,
        ByteString
"/aliases/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
name
      ]

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

-- | /See:/ 'newGetBotAliasResponse' smart constructor.
data GetBotAliasResponse = GetBotAliasResponse'
  { -- | Checksum of the bot alias.
    GetBotAliasResponse -> Maybe Text
checksum :: Prelude.Maybe Prelude.Text,
    -- | The version of the bot that the alias points to.
    GetBotAliasResponse -> Maybe Text
botVersion :: Prelude.Maybe Prelude.Text,
    -- | The name of the bot that the alias points to.
    GetBotAliasResponse -> Maybe Text
botName :: Prelude.Maybe Prelude.Text,
    -- | The date that the bot alias was created.
    GetBotAliasResponse -> Maybe POSIX
createdDate :: Prelude.Maybe Core.POSIX,
    -- | The name of the bot alias.
    GetBotAliasResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The settings that determine how Amazon Lex uses conversation logs for
    -- the alias.
    GetBotAliasResponse -> Maybe ConversationLogsResponse
conversationLogs :: Prelude.Maybe ConversationLogsResponse,
    -- | The date that the bot alias was updated. When you create a resource, the
    -- creation date and the last updated date are the same.
    GetBotAliasResponse -> Maybe POSIX
lastUpdatedDate :: Prelude.Maybe Core.POSIX,
    -- | A description of the bot alias.
    GetBotAliasResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetBotAliasResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetBotAliasResponse -> GetBotAliasResponse -> Bool
(GetBotAliasResponse -> GetBotAliasResponse -> Bool)
-> (GetBotAliasResponse -> GetBotAliasResponse -> Bool)
-> Eq GetBotAliasResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBotAliasResponse -> GetBotAliasResponse -> Bool
$c/= :: GetBotAliasResponse -> GetBotAliasResponse -> Bool
== :: GetBotAliasResponse -> GetBotAliasResponse -> Bool
$c== :: GetBotAliasResponse -> GetBotAliasResponse -> Bool
Prelude.Eq, ReadPrec [GetBotAliasResponse]
ReadPrec GetBotAliasResponse
Int -> ReadS GetBotAliasResponse
ReadS [GetBotAliasResponse]
(Int -> ReadS GetBotAliasResponse)
-> ReadS [GetBotAliasResponse]
-> ReadPrec GetBotAliasResponse
-> ReadPrec [GetBotAliasResponse]
-> Read GetBotAliasResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBotAliasResponse]
$creadListPrec :: ReadPrec [GetBotAliasResponse]
readPrec :: ReadPrec GetBotAliasResponse
$creadPrec :: ReadPrec GetBotAliasResponse
readList :: ReadS [GetBotAliasResponse]
$creadList :: ReadS [GetBotAliasResponse]
readsPrec :: Int -> ReadS GetBotAliasResponse
$creadsPrec :: Int -> ReadS GetBotAliasResponse
Prelude.Read, Int -> GetBotAliasResponse -> ShowS
[GetBotAliasResponse] -> ShowS
GetBotAliasResponse -> String
(Int -> GetBotAliasResponse -> ShowS)
-> (GetBotAliasResponse -> String)
-> ([GetBotAliasResponse] -> ShowS)
-> Show GetBotAliasResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBotAliasResponse] -> ShowS
$cshowList :: [GetBotAliasResponse] -> ShowS
show :: GetBotAliasResponse -> String
$cshow :: GetBotAliasResponse -> String
showsPrec :: Int -> GetBotAliasResponse -> ShowS
$cshowsPrec :: Int -> GetBotAliasResponse -> ShowS
Prelude.Show, (forall x. GetBotAliasResponse -> Rep GetBotAliasResponse x)
-> (forall x. Rep GetBotAliasResponse x -> GetBotAliasResponse)
-> Generic GetBotAliasResponse
forall x. Rep GetBotAliasResponse x -> GetBotAliasResponse
forall x. GetBotAliasResponse -> Rep GetBotAliasResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetBotAliasResponse x -> GetBotAliasResponse
$cfrom :: forall x. GetBotAliasResponse -> Rep GetBotAliasResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetBotAliasResponse' 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', 'getBotAliasResponse_checksum' - Checksum of the bot alias.
--
-- 'botVersion', 'getBotAliasResponse_botVersion' - The version of the bot that the alias points to.
--
-- 'botName', 'getBotAliasResponse_botName' - The name of the bot that the alias points to.
--
-- 'createdDate', 'getBotAliasResponse_createdDate' - The date that the bot alias was created.
--
-- 'name', 'getBotAliasResponse_name' - The name of the bot alias.
--
-- 'conversationLogs', 'getBotAliasResponse_conversationLogs' - The settings that determine how Amazon Lex uses conversation logs for
-- the alias.
--
-- 'lastUpdatedDate', 'getBotAliasResponse_lastUpdatedDate' - The date that the bot alias was updated. When you create a resource, the
-- creation date and the last updated date are the same.
--
-- 'description', 'getBotAliasResponse_description' - A description of the bot alias.
--
-- 'httpStatus', 'getBotAliasResponse_httpStatus' - The response's http status code.
newGetBotAliasResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetBotAliasResponse
newGetBotAliasResponse :: Int -> GetBotAliasResponse
newGetBotAliasResponse Int
pHttpStatus_ =
  GetBotAliasResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ConversationLogsResponse
-> Maybe POSIX
-> Maybe Text
-> Int
-> GetBotAliasResponse
GetBotAliasResponse'
    { $sel:checksum:GetBotAliasResponse' :: Maybe Text
checksum = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:botVersion:GetBotAliasResponse' :: Maybe Text
botVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:botName:GetBotAliasResponse' :: Maybe Text
botName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:GetBotAliasResponse' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetBotAliasResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:conversationLogs:GetBotAliasResponse' :: Maybe ConversationLogsResponse
conversationLogs = Maybe ConversationLogsResponse
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDate:GetBotAliasResponse' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:description:GetBotAliasResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetBotAliasResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Checksum of the bot alias.
getBotAliasResponse_checksum :: Lens.Lens' GetBotAliasResponse (Prelude.Maybe Prelude.Text)
getBotAliasResponse_checksum :: (Maybe Text -> f (Maybe Text))
-> GetBotAliasResponse -> f GetBotAliasResponse
getBotAliasResponse_checksum = (GetBotAliasResponse -> Maybe Text)
-> (GetBotAliasResponse -> Maybe Text -> GetBotAliasResponse)
-> Lens
     GetBotAliasResponse GetBotAliasResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBotAliasResponse' {Maybe Text
checksum :: Maybe Text
$sel:checksum:GetBotAliasResponse' :: GetBotAliasResponse -> Maybe Text
checksum} -> Maybe Text
checksum) (\s :: GetBotAliasResponse
s@GetBotAliasResponse' {} Maybe Text
a -> GetBotAliasResponse
s {$sel:checksum:GetBotAliasResponse' :: Maybe Text
checksum = Maybe Text
a} :: GetBotAliasResponse)

-- | The version of the bot that the alias points to.
getBotAliasResponse_botVersion :: Lens.Lens' GetBotAliasResponse (Prelude.Maybe Prelude.Text)
getBotAliasResponse_botVersion :: (Maybe Text -> f (Maybe Text))
-> GetBotAliasResponse -> f GetBotAliasResponse
getBotAliasResponse_botVersion = (GetBotAliasResponse -> Maybe Text)
-> (GetBotAliasResponse -> Maybe Text -> GetBotAliasResponse)
-> Lens
     GetBotAliasResponse GetBotAliasResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBotAliasResponse' {Maybe Text
botVersion :: Maybe Text
$sel:botVersion:GetBotAliasResponse' :: GetBotAliasResponse -> Maybe Text
botVersion} -> Maybe Text
botVersion) (\s :: GetBotAliasResponse
s@GetBotAliasResponse' {} Maybe Text
a -> GetBotAliasResponse
s {$sel:botVersion:GetBotAliasResponse' :: Maybe Text
botVersion = Maybe Text
a} :: GetBotAliasResponse)

-- | The name of the bot that the alias points to.
getBotAliasResponse_botName :: Lens.Lens' GetBotAliasResponse (Prelude.Maybe Prelude.Text)
getBotAliasResponse_botName :: (Maybe Text -> f (Maybe Text))
-> GetBotAliasResponse -> f GetBotAliasResponse
getBotAliasResponse_botName = (GetBotAliasResponse -> Maybe Text)
-> (GetBotAliasResponse -> Maybe Text -> GetBotAliasResponse)
-> Lens
     GetBotAliasResponse GetBotAliasResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBotAliasResponse' {Maybe Text
botName :: Maybe Text
$sel:botName:GetBotAliasResponse' :: GetBotAliasResponse -> Maybe Text
botName} -> Maybe Text
botName) (\s :: GetBotAliasResponse
s@GetBotAliasResponse' {} Maybe Text
a -> GetBotAliasResponse
s {$sel:botName:GetBotAliasResponse' :: Maybe Text
botName = Maybe Text
a} :: GetBotAliasResponse)

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

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

-- | The settings that determine how Amazon Lex uses conversation logs for
-- the alias.
getBotAliasResponse_conversationLogs :: Lens.Lens' GetBotAliasResponse (Prelude.Maybe ConversationLogsResponse)
getBotAliasResponse_conversationLogs :: (Maybe ConversationLogsResponse
 -> f (Maybe ConversationLogsResponse))
-> GetBotAliasResponse -> f GetBotAliasResponse
getBotAliasResponse_conversationLogs = (GetBotAliasResponse -> Maybe ConversationLogsResponse)
-> (GetBotAliasResponse
    -> Maybe ConversationLogsResponse -> GetBotAliasResponse)
-> Lens
     GetBotAliasResponse
     GetBotAliasResponse
     (Maybe ConversationLogsResponse)
     (Maybe ConversationLogsResponse)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBotAliasResponse' {Maybe ConversationLogsResponse
conversationLogs :: Maybe ConversationLogsResponse
$sel:conversationLogs:GetBotAliasResponse' :: GetBotAliasResponse -> Maybe ConversationLogsResponse
conversationLogs} -> Maybe ConversationLogsResponse
conversationLogs) (\s :: GetBotAliasResponse
s@GetBotAliasResponse' {} Maybe ConversationLogsResponse
a -> GetBotAliasResponse
s {$sel:conversationLogs:GetBotAliasResponse' :: Maybe ConversationLogsResponse
conversationLogs = Maybe ConversationLogsResponse
a} :: GetBotAliasResponse)

-- | The date that the bot alias was updated. When you create a resource, the
-- creation date and the last updated date are the same.
getBotAliasResponse_lastUpdatedDate :: Lens.Lens' GetBotAliasResponse (Prelude.Maybe Prelude.UTCTime)
getBotAliasResponse_lastUpdatedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetBotAliasResponse -> f GetBotAliasResponse
getBotAliasResponse_lastUpdatedDate = (GetBotAliasResponse -> Maybe POSIX)
-> (GetBotAliasResponse -> Maybe POSIX -> GetBotAliasResponse)
-> Lens
     GetBotAliasResponse GetBotAliasResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBotAliasResponse' {Maybe POSIX
lastUpdatedDate :: Maybe POSIX
$sel:lastUpdatedDate:GetBotAliasResponse' :: GetBotAliasResponse -> Maybe POSIX
lastUpdatedDate} -> Maybe POSIX
lastUpdatedDate) (\s :: GetBotAliasResponse
s@GetBotAliasResponse' {} Maybe POSIX
a -> GetBotAliasResponse
s {$sel:lastUpdatedDate:GetBotAliasResponse' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
a} :: GetBotAliasResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetBotAliasResponse -> f GetBotAliasResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetBotAliasResponse
-> f GetBotAliasResponse
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

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

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

instance Prelude.NFData GetBotAliasResponse