{-# 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.BuildBotLocale
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Builds a bot, its intents, and its slot types into a specific locale. A
-- bot can be built into multiple locales. At runtime the locale is used to
-- choose a specific build of the bot.
module Amazonka.LexV2Models.BuildBotLocale
  ( -- * Creating a Request
    BuildBotLocale (..),
    newBuildBotLocale,

    -- * Request Lenses
    buildBotLocale_botId,
    buildBotLocale_botVersion,
    buildBotLocale_localeId,

    -- * Destructuring the Response
    BuildBotLocaleResponse (..),
    newBuildBotLocaleResponse,

    -- * Response Lenses
    buildBotLocaleResponse_botId,
    buildBotLocaleResponse_botLocaleStatus,
    buildBotLocaleResponse_botVersion,
    buildBotLocaleResponse_lastBuildSubmittedDateTime,
    buildBotLocaleResponse_localeId,
    buildBotLocaleResponse_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:/ 'newBuildBotLocale' smart constructor.
data BuildBotLocale = BuildBotLocale'
  { -- | The identifier of the bot to build. The identifier is returned in the
    -- response from the
    -- <https://docs.aws.amazon.com/lexv2/latest/dg/API_CreateBot.html CreateBot>
    -- operation.
    BuildBotLocale -> Text
botId :: Prelude.Text,
    -- | The version of the bot to build. This can only be the draft version of
    -- the bot.
    BuildBotLocale -> Text
botVersion :: Prelude.Text,
    -- | The identifier of the language and locale that the bot will be used in.
    -- The string must match one of the supported locales. All of the intents,
    -- slot types, and slots used in the bot must have the same locale. For
    -- more information, see
    -- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>.
    BuildBotLocale -> Text
localeId :: Prelude.Text
  }
  deriving (BuildBotLocale -> BuildBotLocale -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BuildBotLocale -> BuildBotLocale -> Bool
$c/= :: BuildBotLocale -> BuildBotLocale -> Bool
== :: BuildBotLocale -> BuildBotLocale -> Bool
$c== :: BuildBotLocale -> BuildBotLocale -> Bool
Prelude.Eq, ReadPrec [BuildBotLocale]
ReadPrec BuildBotLocale
Int -> ReadS BuildBotLocale
ReadS [BuildBotLocale]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BuildBotLocale]
$creadListPrec :: ReadPrec [BuildBotLocale]
readPrec :: ReadPrec BuildBotLocale
$creadPrec :: ReadPrec BuildBotLocale
readList :: ReadS [BuildBotLocale]
$creadList :: ReadS [BuildBotLocale]
readsPrec :: Int -> ReadS BuildBotLocale
$creadsPrec :: Int -> ReadS BuildBotLocale
Prelude.Read, Int -> BuildBotLocale -> ShowS
[BuildBotLocale] -> ShowS
BuildBotLocale -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BuildBotLocale] -> ShowS
$cshowList :: [BuildBotLocale] -> ShowS
show :: BuildBotLocale -> String
$cshow :: BuildBotLocale -> String
showsPrec :: Int -> BuildBotLocale -> ShowS
$cshowsPrec :: Int -> BuildBotLocale -> ShowS
Prelude.Show, forall x. Rep BuildBotLocale x -> BuildBotLocale
forall x. BuildBotLocale -> Rep BuildBotLocale x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BuildBotLocale x -> BuildBotLocale
$cfrom :: forall x. BuildBotLocale -> Rep BuildBotLocale x
Prelude.Generic)

-- |
-- Create a value of 'BuildBotLocale' 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:
--
-- 'botId', 'buildBotLocale_botId' - The identifier of the bot to build. The identifier is returned in the
-- response from the
-- <https://docs.aws.amazon.com/lexv2/latest/dg/API_CreateBot.html CreateBot>
-- operation.
--
-- 'botVersion', 'buildBotLocale_botVersion' - The version of the bot to build. This can only be the draft version of
-- the bot.
--
-- 'localeId', 'buildBotLocale_localeId' - The identifier of the language and locale that the bot will be used in.
-- The string must match one of the supported locales. All of the intents,
-- slot types, and slots used in the bot must have the same locale. For
-- more information, see
-- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>.
newBuildBotLocale ::
  -- | 'botId'
  Prelude.Text ->
  -- | 'botVersion'
  Prelude.Text ->
  -- | 'localeId'
  Prelude.Text ->
  BuildBotLocale
newBuildBotLocale :: Text -> Text -> Text -> BuildBotLocale
newBuildBotLocale Text
pBotId_ Text
pBotVersion_ Text
pLocaleId_ =
  BuildBotLocale'
    { $sel:botId:BuildBotLocale' :: Text
botId = Text
pBotId_,
      $sel:botVersion:BuildBotLocale' :: Text
botVersion = Text
pBotVersion_,
      $sel:localeId:BuildBotLocale' :: Text
localeId = Text
pLocaleId_
    }

-- | The identifier of the bot to build. The identifier is returned in the
-- response from the
-- <https://docs.aws.amazon.com/lexv2/latest/dg/API_CreateBot.html CreateBot>
-- operation.
buildBotLocale_botId :: Lens.Lens' BuildBotLocale Prelude.Text
buildBotLocale_botId :: Lens' BuildBotLocale Text
buildBotLocale_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BuildBotLocale' {Text
botId :: Text
$sel:botId:BuildBotLocale' :: BuildBotLocale -> Text
botId} -> Text
botId) (\s :: BuildBotLocale
s@BuildBotLocale' {} Text
a -> BuildBotLocale
s {$sel:botId:BuildBotLocale' :: Text
botId = Text
a} :: BuildBotLocale)

-- | The version of the bot to build. This can only be the draft version of
-- the bot.
buildBotLocale_botVersion :: Lens.Lens' BuildBotLocale Prelude.Text
buildBotLocale_botVersion :: Lens' BuildBotLocale Text
buildBotLocale_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BuildBotLocale' {Text
botVersion :: Text
$sel:botVersion:BuildBotLocale' :: BuildBotLocale -> Text
botVersion} -> Text
botVersion) (\s :: BuildBotLocale
s@BuildBotLocale' {} Text
a -> BuildBotLocale
s {$sel:botVersion:BuildBotLocale' :: Text
botVersion = Text
a} :: BuildBotLocale)

-- | The identifier of the language and locale that the bot will be used in.
-- The string must match one of the supported locales. All of the intents,
-- slot types, and slots used in the bot must have the same locale. For
-- more information, see
-- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>.
buildBotLocale_localeId :: Lens.Lens' BuildBotLocale Prelude.Text
buildBotLocale_localeId :: Lens' BuildBotLocale Text
buildBotLocale_localeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BuildBotLocale' {Text
localeId :: Text
$sel:localeId:BuildBotLocale' :: BuildBotLocale -> Text
localeId} -> Text
localeId) (\s :: BuildBotLocale
s@BuildBotLocale' {} Text
a -> BuildBotLocale
s {$sel:localeId:BuildBotLocale' :: Text
localeId = Text
a} :: BuildBotLocale)

instance Core.AWSRequest BuildBotLocale where
  type
    AWSResponse BuildBotLocale =
      BuildBotLocaleResponse
  request :: (Service -> Service) -> BuildBotLocale -> Request BuildBotLocale
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy BuildBotLocale
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse BuildBotLocale)))
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 BotLocaleStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> BuildBotLocaleResponse
BuildBotLocaleResponse'
            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
"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
"botLocaleStatus")
            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
"lastBuildSubmittedDateTime")
            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
"localeId")
            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 BuildBotLocale where
  hashWithSalt :: Int -> BuildBotLocale -> Int
hashWithSalt Int
_salt BuildBotLocale' {Text
localeId :: Text
botVersion :: Text
botId :: Text
$sel:localeId:BuildBotLocale' :: BuildBotLocale -> Text
$sel:botVersion:BuildBotLocale' :: BuildBotLocale -> Text
$sel:botId:BuildBotLocale' :: BuildBotLocale -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
botId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
botVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
localeId

instance Prelude.NFData BuildBotLocale where
  rnf :: BuildBotLocale -> ()
rnf BuildBotLocale' {Text
localeId :: Text
botVersion :: Text
botId :: Text
$sel:localeId:BuildBotLocale' :: BuildBotLocale -> Text
$sel:botVersion:BuildBotLocale' :: BuildBotLocale -> Text
$sel:botId:BuildBotLocale' :: BuildBotLocale -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
botId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
botVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
localeId

instance Data.ToHeaders BuildBotLocale where
  toHeaders :: BuildBotLocale -> 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 BuildBotLocale where
  toJSON :: BuildBotLocale -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)

instance Data.ToPath BuildBotLocale where
  toPath :: BuildBotLocale -> ByteString
toPath BuildBotLocale' {Text
localeId :: Text
botVersion :: Text
botId :: Text
$sel:localeId:BuildBotLocale' :: BuildBotLocale -> Text
$sel:botVersion:BuildBotLocale' :: BuildBotLocale -> Text
$sel:botId:BuildBotLocale' :: BuildBotLocale -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/bots/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
botId,
        ByteString
"/botversions/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
botVersion,
        ByteString
"/botlocales/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
localeId,
        ByteString
"/"
      ]

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

-- | /See:/ 'newBuildBotLocaleResponse' smart constructor.
data BuildBotLocaleResponse = BuildBotLocaleResponse'
  { -- | The identifier of the specified bot.
    BuildBotLocaleResponse -> Maybe Text
botId :: Prelude.Maybe Prelude.Text,
    -- | The bot\'s build status. When the status is @ReadyExpressTesting@ you
    -- can test the bot using the utterances defined for the intents and slot
    -- types. When the status is @Built@, the bot is ready for use and can be
    -- tested using any utterance.
    BuildBotLocaleResponse -> Maybe BotLocaleStatus
botLocaleStatus :: Prelude.Maybe BotLocaleStatus,
    -- | The version of the bot that was built. This is only the draft version of
    -- the bot.
    BuildBotLocaleResponse -> Maybe Text
botVersion :: Prelude.Maybe Prelude.Text,
    -- | A timestamp indicating the date and time that the bot was last built for
    -- this locale.
    BuildBotLocaleResponse -> Maybe POSIX
lastBuildSubmittedDateTime :: Prelude.Maybe Data.POSIX,
    -- | The language and locale specified of where the bot can be used.
    BuildBotLocaleResponse -> Maybe Text
localeId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    BuildBotLocaleResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (BuildBotLocaleResponse -> BuildBotLocaleResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BuildBotLocaleResponse -> BuildBotLocaleResponse -> Bool
$c/= :: BuildBotLocaleResponse -> BuildBotLocaleResponse -> Bool
== :: BuildBotLocaleResponse -> BuildBotLocaleResponse -> Bool
$c== :: BuildBotLocaleResponse -> BuildBotLocaleResponse -> Bool
Prelude.Eq, ReadPrec [BuildBotLocaleResponse]
ReadPrec BuildBotLocaleResponse
Int -> ReadS BuildBotLocaleResponse
ReadS [BuildBotLocaleResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BuildBotLocaleResponse]
$creadListPrec :: ReadPrec [BuildBotLocaleResponse]
readPrec :: ReadPrec BuildBotLocaleResponse
$creadPrec :: ReadPrec BuildBotLocaleResponse
readList :: ReadS [BuildBotLocaleResponse]
$creadList :: ReadS [BuildBotLocaleResponse]
readsPrec :: Int -> ReadS BuildBotLocaleResponse
$creadsPrec :: Int -> ReadS BuildBotLocaleResponse
Prelude.Read, Int -> BuildBotLocaleResponse -> ShowS
[BuildBotLocaleResponse] -> ShowS
BuildBotLocaleResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BuildBotLocaleResponse] -> ShowS
$cshowList :: [BuildBotLocaleResponse] -> ShowS
show :: BuildBotLocaleResponse -> String
$cshow :: BuildBotLocaleResponse -> String
showsPrec :: Int -> BuildBotLocaleResponse -> ShowS
$cshowsPrec :: Int -> BuildBotLocaleResponse -> ShowS
Prelude.Show, forall x. Rep BuildBotLocaleResponse x -> BuildBotLocaleResponse
forall x. BuildBotLocaleResponse -> Rep BuildBotLocaleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BuildBotLocaleResponse x -> BuildBotLocaleResponse
$cfrom :: forall x. BuildBotLocaleResponse -> Rep BuildBotLocaleResponse x
Prelude.Generic)

-- |
-- Create a value of 'BuildBotLocaleResponse' 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:
--
-- 'botId', 'buildBotLocaleResponse_botId' - The identifier of the specified bot.
--
-- 'botLocaleStatus', 'buildBotLocaleResponse_botLocaleStatus' - The bot\'s build status. When the status is @ReadyExpressTesting@ you
-- can test the bot using the utterances defined for the intents and slot
-- types. When the status is @Built@, the bot is ready for use and can be
-- tested using any utterance.
--
-- 'botVersion', 'buildBotLocaleResponse_botVersion' - The version of the bot that was built. This is only the draft version of
-- the bot.
--
-- 'lastBuildSubmittedDateTime', 'buildBotLocaleResponse_lastBuildSubmittedDateTime' - A timestamp indicating the date and time that the bot was last built for
-- this locale.
--
-- 'localeId', 'buildBotLocaleResponse_localeId' - The language and locale specified of where the bot can be used.
--
-- 'httpStatus', 'buildBotLocaleResponse_httpStatus' - The response's http status code.
newBuildBotLocaleResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BuildBotLocaleResponse
newBuildBotLocaleResponse :: Int -> BuildBotLocaleResponse
newBuildBotLocaleResponse Int
pHttpStatus_ =
  BuildBotLocaleResponse'
    { $sel:botId:BuildBotLocaleResponse' :: Maybe Text
botId = forall a. Maybe a
Prelude.Nothing,
      $sel:botLocaleStatus:BuildBotLocaleResponse' :: Maybe BotLocaleStatus
botLocaleStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:botVersion:BuildBotLocaleResponse' :: Maybe Text
botVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:lastBuildSubmittedDateTime:BuildBotLocaleResponse' :: Maybe POSIX
lastBuildSubmittedDateTime = forall a. Maybe a
Prelude.Nothing,
      $sel:localeId:BuildBotLocaleResponse' :: Maybe Text
localeId = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:BuildBotLocaleResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The identifier of the specified bot.
buildBotLocaleResponse_botId :: Lens.Lens' BuildBotLocaleResponse (Prelude.Maybe Prelude.Text)
buildBotLocaleResponse_botId :: Lens' BuildBotLocaleResponse (Maybe Text)
buildBotLocaleResponse_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BuildBotLocaleResponse' {Maybe Text
botId :: Maybe Text
$sel:botId:BuildBotLocaleResponse' :: BuildBotLocaleResponse -> Maybe Text
botId} -> Maybe Text
botId) (\s :: BuildBotLocaleResponse
s@BuildBotLocaleResponse' {} Maybe Text
a -> BuildBotLocaleResponse
s {$sel:botId:BuildBotLocaleResponse' :: Maybe Text
botId = Maybe Text
a} :: BuildBotLocaleResponse)

-- | The bot\'s build status. When the status is @ReadyExpressTesting@ you
-- can test the bot using the utterances defined for the intents and slot
-- types. When the status is @Built@, the bot is ready for use and can be
-- tested using any utterance.
buildBotLocaleResponse_botLocaleStatus :: Lens.Lens' BuildBotLocaleResponse (Prelude.Maybe BotLocaleStatus)
buildBotLocaleResponse_botLocaleStatus :: Lens' BuildBotLocaleResponse (Maybe BotLocaleStatus)
buildBotLocaleResponse_botLocaleStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BuildBotLocaleResponse' {Maybe BotLocaleStatus
botLocaleStatus :: Maybe BotLocaleStatus
$sel:botLocaleStatus:BuildBotLocaleResponse' :: BuildBotLocaleResponse -> Maybe BotLocaleStatus
botLocaleStatus} -> Maybe BotLocaleStatus
botLocaleStatus) (\s :: BuildBotLocaleResponse
s@BuildBotLocaleResponse' {} Maybe BotLocaleStatus
a -> BuildBotLocaleResponse
s {$sel:botLocaleStatus:BuildBotLocaleResponse' :: Maybe BotLocaleStatus
botLocaleStatus = Maybe BotLocaleStatus
a} :: BuildBotLocaleResponse)

-- | The version of the bot that was built. This is only the draft version of
-- the bot.
buildBotLocaleResponse_botVersion :: Lens.Lens' BuildBotLocaleResponse (Prelude.Maybe Prelude.Text)
buildBotLocaleResponse_botVersion :: Lens' BuildBotLocaleResponse (Maybe Text)
buildBotLocaleResponse_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BuildBotLocaleResponse' {Maybe Text
botVersion :: Maybe Text
$sel:botVersion:BuildBotLocaleResponse' :: BuildBotLocaleResponse -> Maybe Text
botVersion} -> Maybe Text
botVersion) (\s :: BuildBotLocaleResponse
s@BuildBotLocaleResponse' {} Maybe Text
a -> BuildBotLocaleResponse
s {$sel:botVersion:BuildBotLocaleResponse' :: Maybe Text
botVersion = Maybe Text
a} :: BuildBotLocaleResponse)

-- | A timestamp indicating the date and time that the bot was last built for
-- this locale.
buildBotLocaleResponse_lastBuildSubmittedDateTime :: Lens.Lens' BuildBotLocaleResponse (Prelude.Maybe Prelude.UTCTime)
buildBotLocaleResponse_lastBuildSubmittedDateTime :: Lens' BuildBotLocaleResponse (Maybe UTCTime)
buildBotLocaleResponse_lastBuildSubmittedDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BuildBotLocaleResponse' {Maybe POSIX
lastBuildSubmittedDateTime :: Maybe POSIX
$sel:lastBuildSubmittedDateTime:BuildBotLocaleResponse' :: BuildBotLocaleResponse -> Maybe POSIX
lastBuildSubmittedDateTime} -> Maybe POSIX
lastBuildSubmittedDateTime) (\s :: BuildBotLocaleResponse
s@BuildBotLocaleResponse' {} Maybe POSIX
a -> BuildBotLocaleResponse
s {$sel:lastBuildSubmittedDateTime:BuildBotLocaleResponse' :: Maybe POSIX
lastBuildSubmittedDateTime = Maybe POSIX
a} :: BuildBotLocaleResponse) 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 language and locale specified of where the bot can be used.
buildBotLocaleResponse_localeId :: Lens.Lens' BuildBotLocaleResponse (Prelude.Maybe Prelude.Text)
buildBotLocaleResponse_localeId :: Lens' BuildBotLocaleResponse (Maybe Text)
buildBotLocaleResponse_localeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BuildBotLocaleResponse' {Maybe Text
localeId :: Maybe Text
$sel:localeId:BuildBotLocaleResponse' :: BuildBotLocaleResponse -> Maybe Text
localeId} -> Maybe Text
localeId) (\s :: BuildBotLocaleResponse
s@BuildBotLocaleResponse' {} Maybe Text
a -> BuildBotLocaleResponse
s {$sel:localeId:BuildBotLocaleResponse' :: Maybe Text
localeId = Maybe Text
a} :: BuildBotLocaleResponse)

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

instance Prelude.NFData BuildBotLocaleResponse where
  rnf :: BuildBotLocaleResponse -> ()
rnf BuildBotLocaleResponse' {Int
Maybe Text
Maybe POSIX
Maybe BotLocaleStatus
httpStatus :: Int
localeId :: Maybe Text
lastBuildSubmittedDateTime :: Maybe POSIX
botVersion :: Maybe Text
botLocaleStatus :: Maybe BotLocaleStatus
botId :: Maybe Text
$sel:httpStatus:BuildBotLocaleResponse' :: BuildBotLocaleResponse -> Int
$sel:localeId:BuildBotLocaleResponse' :: BuildBotLocaleResponse -> Maybe Text
$sel:lastBuildSubmittedDateTime:BuildBotLocaleResponse' :: BuildBotLocaleResponse -> Maybe POSIX
$sel:botVersion:BuildBotLocaleResponse' :: BuildBotLocaleResponse -> Maybe Text
$sel:botLocaleStatus:BuildBotLocaleResponse' :: BuildBotLocaleResponse -> Maybe BotLocaleStatus
$sel:botId:BuildBotLocaleResponse' :: BuildBotLocaleResponse -> Maybe Text
..} =
    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 BotLocaleStatus
botLocaleStatus
      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 POSIX
lastBuildSubmittedDateTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
localeId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus