{-# 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.UpdateBotRecommendation
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates an existing bot recommendation request.
module Amazonka.LexV2Models.UpdateBotRecommendation
  ( -- * Creating a Request
    UpdateBotRecommendation (..),
    newUpdateBotRecommendation,

    -- * Request Lenses
    updateBotRecommendation_botId,
    updateBotRecommendation_botVersion,
    updateBotRecommendation_localeId,
    updateBotRecommendation_botRecommendationId,
    updateBotRecommendation_encryptionSetting,

    -- * Destructuring the Response
    UpdateBotRecommendationResponse (..),
    newUpdateBotRecommendationResponse,

    -- * Response Lenses
    updateBotRecommendationResponse_botId,
    updateBotRecommendationResponse_botRecommendationId,
    updateBotRecommendationResponse_botRecommendationStatus,
    updateBotRecommendationResponse_botVersion,
    updateBotRecommendationResponse_creationDateTime,
    updateBotRecommendationResponse_encryptionSetting,
    updateBotRecommendationResponse_lastUpdatedDateTime,
    updateBotRecommendationResponse_localeId,
    updateBotRecommendationResponse_transcriptSourceSetting,
    updateBotRecommendationResponse_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:/ 'newUpdateBotRecommendation' smart constructor.
data UpdateBotRecommendation = UpdateBotRecommendation'
  { -- | The unique identifier of the bot containing the bot recommendation to be
    -- updated.
    UpdateBotRecommendation -> Text
botId :: Prelude.Text,
    -- | The version of the bot containing the bot recommendation to be updated.
    UpdateBotRecommendation -> Text
botVersion :: Prelude.Text,
    -- | The identifier of the language and locale of the bot recommendation to
    -- update. The string must match one of the supported locales. For more
    -- information, see
    -- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>
    UpdateBotRecommendation -> Text
localeId :: Prelude.Text,
    -- | The unique identifier of the bot recommendation to be updated.
    UpdateBotRecommendation -> Text
botRecommendationId :: Prelude.Text,
    -- | The object representing the passwords that will be used to encrypt the
    -- data related to the bot recommendation results, as well as the KMS key
    -- ARN used to encrypt the associated metadata.
    UpdateBotRecommendation -> EncryptionSetting
encryptionSetting :: EncryptionSetting
  }
  deriving (UpdateBotRecommendation -> UpdateBotRecommendation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateBotRecommendation -> UpdateBotRecommendation -> Bool
$c/= :: UpdateBotRecommendation -> UpdateBotRecommendation -> Bool
== :: UpdateBotRecommendation -> UpdateBotRecommendation -> Bool
$c== :: UpdateBotRecommendation -> UpdateBotRecommendation -> Bool
Prelude.Eq, Int -> UpdateBotRecommendation -> ShowS
[UpdateBotRecommendation] -> ShowS
UpdateBotRecommendation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateBotRecommendation] -> ShowS
$cshowList :: [UpdateBotRecommendation] -> ShowS
show :: UpdateBotRecommendation -> String
$cshow :: UpdateBotRecommendation -> String
showsPrec :: Int -> UpdateBotRecommendation -> ShowS
$cshowsPrec :: Int -> UpdateBotRecommendation -> ShowS
Prelude.Show, forall x. Rep UpdateBotRecommendation x -> UpdateBotRecommendation
forall x. UpdateBotRecommendation -> Rep UpdateBotRecommendation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateBotRecommendation x -> UpdateBotRecommendation
$cfrom :: forall x. UpdateBotRecommendation -> Rep UpdateBotRecommendation x
Prelude.Generic)

-- |
-- Create a value of 'UpdateBotRecommendation' 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', 'updateBotRecommendation_botId' - The unique identifier of the bot containing the bot recommendation to be
-- updated.
--
-- 'botVersion', 'updateBotRecommendation_botVersion' - The version of the bot containing the bot recommendation to be updated.
--
-- 'localeId', 'updateBotRecommendation_localeId' - The identifier of the language and locale of the bot recommendation to
-- update. The string must match one of the supported locales. For more
-- information, see
-- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>
--
-- 'botRecommendationId', 'updateBotRecommendation_botRecommendationId' - The unique identifier of the bot recommendation to be updated.
--
-- 'encryptionSetting', 'updateBotRecommendation_encryptionSetting' - The object representing the passwords that will be used to encrypt the
-- data related to the bot recommendation results, as well as the KMS key
-- ARN used to encrypt the associated metadata.
newUpdateBotRecommendation ::
  -- | 'botId'
  Prelude.Text ->
  -- | 'botVersion'
  Prelude.Text ->
  -- | 'localeId'
  Prelude.Text ->
  -- | 'botRecommendationId'
  Prelude.Text ->
  -- | 'encryptionSetting'
  EncryptionSetting ->
  UpdateBotRecommendation
newUpdateBotRecommendation :: Text
-> Text
-> Text
-> Text
-> EncryptionSetting
-> UpdateBotRecommendation
newUpdateBotRecommendation
  Text
pBotId_
  Text
pBotVersion_
  Text
pLocaleId_
  Text
pBotRecommendationId_
  EncryptionSetting
pEncryptionSetting_ =
    UpdateBotRecommendation'
      { $sel:botId:UpdateBotRecommendation' :: Text
botId = Text
pBotId_,
        $sel:botVersion:UpdateBotRecommendation' :: Text
botVersion = Text
pBotVersion_,
        $sel:localeId:UpdateBotRecommendation' :: Text
localeId = Text
pLocaleId_,
        $sel:botRecommendationId:UpdateBotRecommendation' :: Text
botRecommendationId = Text
pBotRecommendationId_,
        $sel:encryptionSetting:UpdateBotRecommendation' :: EncryptionSetting
encryptionSetting = EncryptionSetting
pEncryptionSetting_
      }

-- | The unique identifier of the bot containing the bot recommendation to be
-- updated.
updateBotRecommendation_botId :: Lens.Lens' UpdateBotRecommendation Prelude.Text
updateBotRecommendation_botId :: Lens' UpdateBotRecommendation Text
updateBotRecommendation_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBotRecommendation' {Text
botId :: Text
$sel:botId:UpdateBotRecommendation' :: UpdateBotRecommendation -> Text
botId} -> Text
botId) (\s :: UpdateBotRecommendation
s@UpdateBotRecommendation' {} Text
a -> UpdateBotRecommendation
s {$sel:botId:UpdateBotRecommendation' :: Text
botId = Text
a} :: UpdateBotRecommendation)

-- | The version of the bot containing the bot recommendation to be updated.
updateBotRecommendation_botVersion :: Lens.Lens' UpdateBotRecommendation Prelude.Text
updateBotRecommendation_botVersion :: Lens' UpdateBotRecommendation Text
updateBotRecommendation_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBotRecommendation' {Text
botVersion :: Text
$sel:botVersion:UpdateBotRecommendation' :: UpdateBotRecommendation -> Text
botVersion} -> Text
botVersion) (\s :: UpdateBotRecommendation
s@UpdateBotRecommendation' {} Text
a -> UpdateBotRecommendation
s {$sel:botVersion:UpdateBotRecommendation' :: Text
botVersion = Text
a} :: UpdateBotRecommendation)

-- | The identifier of the language and locale of the bot recommendation to
-- update. The string must match one of the supported locales. For more
-- information, see
-- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>
updateBotRecommendation_localeId :: Lens.Lens' UpdateBotRecommendation Prelude.Text
updateBotRecommendation_localeId :: Lens' UpdateBotRecommendation Text
updateBotRecommendation_localeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBotRecommendation' {Text
localeId :: Text
$sel:localeId:UpdateBotRecommendation' :: UpdateBotRecommendation -> Text
localeId} -> Text
localeId) (\s :: UpdateBotRecommendation
s@UpdateBotRecommendation' {} Text
a -> UpdateBotRecommendation
s {$sel:localeId:UpdateBotRecommendation' :: Text
localeId = Text
a} :: UpdateBotRecommendation)

-- | The unique identifier of the bot recommendation to be updated.
updateBotRecommendation_botRecommendationId :: Lens.Lens' UpdateBotRecommendation Prelude.Text
updateBotRecommendation_botRecommendationId :: Lens' UpdateBotRecommendation Text
updateBotRecommendation_botRecommendationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBotRecommendation' {Text
botRecommendationId :: Text
$sel:botRecommendationId:UpdateBotRecommendation' :: UpdateBotRecommendation -> Text
botRecommendationId} -> Text
botRecommendationId) (\s :: UpdateBotRecommendation
s@UpdateBotRecommendation' {} Text
a -> UpdateBotRecommendation
s {$sel:botRecommendationId:UpdateBotRecommendation' :: Text
botRecommendationId = Text
a} :: UpdateBotRecommendation)

-- | The object representing the passwords that will be used to encrypt the
-- data related to the bot recommendation results, as well as the KMS key
-- ARN used to encrypt the associated metadata.
updateBotRecommendation_encryptionSetting :: Lens.Lens' UpdateBotRecommendation EncryptionSetting
updateBotRecommendation_encryptionSetting :: Lens' UpdateBotRecommendation EncryptionSetting
updateBotRecommendation_encryptionSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBotRecommendation' {EncryptionSetting
encryptionSetting :: EncryptionSetting
$sel:encryptionSetting:UpdateBotRecommendation' :: UpdateBotRecommendation -> EncryptionSetting
encryptionSetting} -> EncryptionSetting
encryptionSetting) (\s :: UpdateBotRecommendation
s@UpdateBotRecommendation' {} EncryptionSetting
a -> UpdateBotRecommendation
s {$sel:encryptionSetting:UpdateBotRecommendation' :: EncryptionSetting
encryptionSetting = EncryptionSetting
a} :: UpdateBotRecommendation)

instance Core.AWSRequest UpdateBotRecommendation where
  type
    AWSResponse UpdateBotRecommendation =
      UpdateBotRecommendationResponse
  request :: (Service -> Service)
-> UpdateBotRecommendation -> Request UpdateBotRecommendation
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 UpdateBotRecommendation
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateBotRecommendation)))
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 Text
-> Maybe BotRecommendationStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe EncryptionSetting
-> Maybe POSIX
-> Maybe Text
-> Maybe TranscriptSourceSetting
-> Int
-> UpdateBotRecommendationResponse
UpdateBotRecommendationResponse'
            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
"botRecommendationId")
            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
"botRecommendationStatus")
            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
"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
"encryptionSetting")
            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
"lastUpdatedDateTime")
            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.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"transcriptSourceSetting")
            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 UpdateBotRecommendation where
  hashWithSalt :: Int -> UpdateBotRecommendation -> Int
hashWithSalt Int
_salt UpdateBotRecommendation' {Text
EncryptionSetting
encryptionSetting :: EncryptionSetting
botRecommendationId :: Text
localeId :: Text
botVersion :: Text
botId :: Text
$sel:encryptionSetting:UpdateBotRecommendation' :: UpdateBotRecommendation -> EncryptionSetting
$sel:botRecommendationId:UpdateBotRecommendation' :: UpdateBotRecommendation -> Text
$sel:localeId:UpdateBotRecommendation' :: UpdateBotRecommendation -> Text
$sel:botVersion:UpdateBotRecommendation' :: UpdateBotRecommendation -> Text
$sel:botId:UpdateBotRecommendation' :: UpdateBotRecommendation -> 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
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
botRecommendationId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` EncryptionSetting
encryptionSetting

instance Prelude.NFData UpdateBotRecommendation where
  rnf :: UpdateBotRecommendation -> ()
rnf UpdateBotRecommendation' {Text
EncryptionSetting
encryptionSetting :: EncryptionSetting
botRecommendationId :: Text
localeId :: Text
botVersion :: Text
botId :: Text
$sel:encryptionSetting:UpdateBotRecommendation' :: UpdateBotRecommendation -> EncryptionSetting
$sel:botRecommendationId:UpdateBotRecommendation' :: UpdateBotRecommendation -> Text
$sel:localeId:UpdateBotRecommendation' :: UpdateBotRecommendation -> Text
$sel:botVersion:UpdateBotRecommendation' :: UpdateBotRecommendation -> Text
$sel:botId:UpdateBotRecommendation' :: UpdateBotRecommendation -> 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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
botRecommendationId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf EncryptionSetting
encryptionSetting

instance Data.ToHeaders UpdateBotRecommendation where
  toHeaders :: UpdateBotRecommendation -> 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 UpdateBotRecommendation where
  toJSON :: UpdateBotRecommendation -> Value
toJSON UpdateBotRecommendation' {Text
EncryptionSetting
encryptionSetting :: EncryptionSetting
botRecommendationId :: Text
localeId :: Text
botVersion :: Text
botId :: Text
$sel:encryptionSetting:UpdateBotRecommendation' :: UpdateBotRecommendation -> EncryptionSetting
$sel:botRecommendationId:UpdateBotRecommendation' :: UpdateBotRecommendation -> Text
$sel:localeId:UpdateBotRecommendation' :: UpdateBotRecommendation -> Text
$sel:botVersion:UpdateBotRecommendation' :: UpdateBotRecommendation -> Text
$sel:botId:UpdateBotRecommendation' :: UpdateBotRecommendation -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just
              (Key
"encryptionSetting" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= EncryptionSetting
encryptionSetting)
          ]
      )

instance Data.ToPath UpdateBotRecommendation where
  toPath :: UpdateBotRecommendation -> ByteString
toPath UpdateBotRecommendation' {Text
EncryptionSetting
encryptionSetting :: EncryptionSetting
botRecommendationId :: Text
localeId :: Text
botVersion :: Text
botId :: Text
$sel:encryptionSetting:UpdateBotRecommendation' :: UpdateBotRecommendation -> EncryptionSetting
$sel:botRecommendationId:UpdateBotRecommendation' :: UpdateBotRecommendation -> Text
$sel:localeId:UpdateBotRecommendation' :: UpdateBotRecommendation -> Text
$sel:botVersion:UpdateBotRecommendation' :: UpdateBotRecommendation -> Text
$sel:botId:UpdateBotRecommendation' :: UpdateBotRecommendation -> 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
"/botrecommendations/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
botRecommendationId,
        ByteString
"/"
      ]

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

-- | /See:/ 'newUpdateBotRecommendationResponse' smart constructor.
data UpdateBotRecommendationResponse = UpdateBotRecommendationResponse'
  { -- | The unique identifier of the bot containing the bot recommendation that
    -- has been updated.
    UpdateBotRecommendationResponse -> Maybe Text
botId :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the bot recommendation to be updated.
    UpdateBotRecommendationResponse -> Maybe Text
botRecommendationId :: Prelude.Maybe Prelude.Text,
    -- | The status of the bot recommendation.
    --
    -- If the status is Failed, then the reasons for the failure are listed in
    -- the failureReasons field.
    UpdateBotRecommendationResponse -> Maybe BotRecommendationStatus
botRecommendationStatus :: Prelude.Maybe BotRecommendationStatus,
    -- | The version of the bot containing the bot recommendation that has been
    -- updated.
    UpdateBotRecommendationResponse -> Maybe Text
botVersion :: Prelude.Maybe Prelude.Text,
    -- | A timestamp of the date and time that the bot recommendation was
    -- created.
    UpdateBotRecommendationResponse -> Maybe POSIX
creationDateTime :: Prelude.Maybe Data.POSIX,
    -- | The object representing the passwords that were used to encrypt the data
    -- related to the bot recommendation results, as well as the KMS key ARN
    -- used to encrypt the associated metadata.
    UpdateBotRecommendationResponse -> Maybe EncryptionSetting
encryptionSetting :: Prelude.Maybe EncryptionSetting,
    -- | A timestamp of the date and time that the bot recommendation was last
    -- updated.
    UpdateBotRecommendationResponse -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Data.POSIX,
    -- | The identifier of the language and locale of the bot recommendation to
    -- update. The string must match one of the supported locales. For more
    -- information, see
    -- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>
    UpdateBotRecommendationResponse -> Maybe Text
localeId :: Prelude.Maybe Prelude.Text,
    -- | The object representing the Amazon S3 bucket containing the transcript,
    -- as well as the associated metadata.
    UpdateBotRecommendationResponse -> Maybe TranscriptSourceSetting
transcriptSourceSetting :: Prelude.Maybe TranscriptSourceSetting,
    -- | The response's http status code.
    UpdateBotRecommendationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateBotRecommendationResponse
-> UpdateBotRecommendationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateBotRecommendationResponse
-> UpdateBotRecommendationResponse -> Bool
$c/= :: UpdateBotRecommendationResponse
-> UpdateBotRecommendationResponse -> Bool
== :: UpdateBotRecommendationResponse
-> UpdateBotRecommendationResponse -> Bool
$c== :: UpdateBotRecommendationResponse
-> UpdateBotRecommendationResponse -> Bool
Prelude.Eq, Int -> UpdateBotRecommendationResponse -> ShowS
[UpdateBotRecommendationResponse] -> ShowS
UpdateBotRecommendationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateBotRecommendationResponse] -> ShowS
$cshowList :: [UpdateBotRecommendationResponse] -> ShowS
show :: UpdateBotRecommendationResponse -> String
$cshow :: UpdateBotRecommendationResponse -> String
showsPrec :: Int -> UpdateBotRecommendationResponse -> ShowS
$cshowsPrec :: Int -> UpdateBotRecommendationResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateBotRecommendationResponse x
-> UpdateBotRecommendationResponse
forall x.
UpdateBotRecommendationResponse
-> Rep UpdateBotRecommendationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateBotRecommendationResponse x
-> UpdateBotRecommendationResponse
$cfrom :: forall x.
UpdateBotRecommendationResponse
-> Rep UpdateBotRecommendationResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateBotRecommendationResponse' 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', 'updateBotRecommendationResponse_botId' - The unique identifier of the bot containing the bot recommendation that
-- has been updated.
--
-- 'botRecommendationId', 'updateBotRecommendationResponse_botRecommendationId' - The unique identifier of the bot recommendation to be updated.
--
-- 'botRecommendationStatus', 'updateBotRecommendationResponse_botRecommendationStatus' - The status of the bot recommendation.
--
-- If the status is Failed, then the reasons for the failure are listed in
-- the failureReasons field.
--
-- 'botVersion', 'updateBotRecommendationResponse_botVersion' - The version of the bot containing the bot recommendation that has been
-- updated.
--
-- 'creationDateTime', 'updateBotRecommendationResponse_creationDateTime' - A timestamp of the date and time that the bot recommendation was
-- created.
--
-- 'encryptionSetting', 'updateBotRecommendationResponse_encryptionSetting' - The object representing the passwords that were used to encrypt the data
-- related to the bot recommendation results, as well as the KMS key ARN
-- used to encrypt the associated metadata.
--
-- 'lastUpdatedDateTime', 'updateBotRecommendationResponse_lastUpdatedDateTime' - A timestamp of the date and time that the bot recommendation was last
-- updated.
--
-- 'localeId', 'updateBotRecommendationResponse_localeId' - The identifier of the language and locale of the bot recommendation to
-- update. The string must match one of the supported locales. For more
-- information, see
-- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>
--
-- 'transcriptSourceSetting', 'updateBotRecommendationResponse_transcriptSourceSetting' - The object representing the Amazon S3 bucket containing the transcript,
-- as well as the associated metadata.
--
-- 'httpStatus', 'updateBotRecommendationResponse_httpStatus' - The response's http status code.
newUpdateBotRecommendationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateBotRecommendationResponse
newUpdateBotRecommendationResponse :: Int -> UpdateBotRecommendationResponse
newUpdateBotRecommendationResponse Int
pHttpStatus_ =
  UpdateBotRecommendationResponse'
    { $sel:botId:UpdateBotRecommendationResponse' :: Maybe Text
botId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:botRecommendationId:UpdateBotRecommendationResponse' :: Maybe Text
botRecommendationId = forall a. Maybe a
Prelude.Nothing,
      $sel:botRecommendationStatus:UpdateBotRecommendationResponse' :: Maybe BotRecommendationStatus
botRecommendationStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:botVersion:UpdateBotRecommendationResponse' :: Maybe Text
botVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:creationDateTime:UpdateBotRecommendationResponse' :: Maybe POSIX
creationDateTime = forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionSetting:UpdateBotRecommendationResponse' :: Maybe EncryptionSetting
encryptionSetting = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDateTime:UpdateBotRecommendationResponse' :: Maybe POSIX
lastUpdatedDateTime = forall a. Maybe a
Prelude.Nothing,
      $sel:localeId:UpdateBotRecommendationResponse' :: Maybe Text
localeId = forall a. Maybe a
Prelude.Nothing,
      $sel:transcriptSourceSetting:UpdateBotRecommendationResponse' :: Maybe TranscriptSourceSetting
transcriptSourceSetting = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateBotRecommendationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The unique identifier of the bot containing the bot recommendation that
-- has been updated.
updateBotRecommendationResponse_botId :: Lens.Lens' UpdateBotRecommendationResponse (Prelude.Maybe Prelude.Text)
updateBotRecommendationResponse_botId :: Lens' UpdateBotRecommendationResponse (Maybe Text)
updateBotRecommendationResponse_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBotRecommendationResponse' {Maybe Text
botId :: Maybe Text
$sel:botId:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> Maybe Text
botId} -> Maybe Text
botId) (\s :: UpdateBotRecommendationResponse
s@UpdateBotRecommendationResponse' {} Maybe Text
a -> UpdateBotRecommendationResponse
s {$sel:botId:UpdateBotRecommendationResponse' :: Maybe Text
botId = Maybe Text
a} :: UpdateBotRecommendationResponse)

-- | The unique identifier of the bot recommendation to be updated.
updateBotRecommendationResponse_botRecommendationId :: Lens.Lens' UpdateBotRecommendationResponse (Prelude.Maybe Prelude.Text)
updateBotRecommendationResponse_botRecommendationId :: Lens' UpdateBotRecommendationResponse (Maybe Text)
updateBotRecommendationResponse_botRecommendationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBotRecommendationResponse' {Maybe Text
botRecommendationId :: Maybe Text
$sel:botRecommendationId:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> Maybe Text
botRecommendationId} -> Maybe Text
botRecommendationId) (\s :: UpdateBotRecommendationResponse
s@UpdateBotRecommendationResponse' {} Maybe Text
a -> UpdateBotRecommendationResponse
s {$sel:botRecommendationId:UpdateBotRecommendationResponse' :: Maybe Text
botRecommendationId = Maybe Text
a} :: UpdateBotRecommendationResponse)

-- | The status of the bot recommendation.
--
-- If the status is Failed, then the reasons for the failure are listed in
-- the failureReasons field.
updateBotRecommendationResponse_botRecommendationStatus :: Lens.Lens' UpdateBotRecommendationResponse (Prelude.Maybe BotRecommendationStatus)
updateBotRecommendationResponse_botRecommendationStatus :: Lens'
  UpdateBotRecommendationResponse (Maybe BotRecommendationStatus)
updateBotRecommendationResponse_botRecommendationStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBotRecommendationResponse' {Maybe BotRecommendationStatus
botRecommendationStatus :: Maybe BotRecommendationStatus
$sel:botRecommendationStatus:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> Maybe BotRecommendationStatus
botRecommendationStatus} -> Maybe BotRecommendationStatus
botRecommendationStatus) (\s :: UpdateBotRecommendationResponse
s@UpdateBotRecommendationResponse' {} Maybe BotRecommendationStatus
a -> UpdateBotRecommendationResponse
s {$sel:botRecommendationStatus:UpdateBotRecommendationResponse' :: Maybe BotRecommendationStatus
botRecommendationStatus = Maybe BotRecommendationStatus
a} :: UpdateBotRecommendationResponse)

-- | The version of the bot containing the bot recommendation that has been
-- updated.
updateBotRecommendationResponse_botVersion :: Lens.Lens' UpdateBotRecommendationResponse (Prelude.Maybe Prelude.Text)
updateBotRecommendationResponse_botVersion :: Lens' UpdateBotRecommendationResponse (Maybe Text)
updateBotRecommendationResponse_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBotRecommendationResponse' {Maybe Text
botVersion :: Maybe Text
$sel:botVersion:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> Maybe Text
botVersion} -> Maybe Text
botVersion) (\s :: UpdateBotRecommendationResponse
s@UpdateBotRecommendationResponse' {} Maybe Text
a -> UpdateBotRecommendationResponse
s {$sel:botVersion:UpdateBotRecommendationResponse' :: Maybe Text
botVersion = Maybe Text
a} :: UpdateBotRecommendationResponse)

-- | A timestamp of the date and time that the bot recommendation was
-- created.
updateBotRecommendationResponse_creationDateTime :: Lens.Lens' UpdateBotRecommendationResponse (Prelude.Maybe Prelude.UTCTime)
updateBotRecommendationResponse_creationDateTime :: Lens' UpdateBotRecommendationResponse (Maybe UTCTime)
updateBotRecommendationResponse_creationDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBotRecommendationResponse' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: UpdateBotRecommendationResponse
s@UpdateBotRecommendationResponse' {} Maybe POSIX
a -> UpdateBotRecommendationResponse
s {$sel:creationDateTime:UpdateBotRecommendationResponse' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: UpdateBotRecommendationResponse) 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 object representing the passwords that were used to encrypt the data
-- related to the bot recommendation results, as well as the KMS key ARN
-- used to encrypt the associated metadata.
updateBotRecommendationResponse_encryptionSetting :: Lens.Lens' UpdateBotRecommendationResponse (Prelude.Maybe EncryptionSetting)
updateBotRecommendationResponse_encryptionSetting :: Lens' UpdateBotRecommendationResponse (Maybe EncryptionSetting)
updateBotRecommendationResponse_encryptionSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBotRecommendationResponse' {Maybe EncryptionSetting
encryptionSetting :: Maybe EncryptionSetting
$sel:encryptionSetting:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> Maybe EncryptionSetting
encryptionSetting} -> Maybe EncryptionSetting
encryptionSetting) (\s :: UpdateBotRecommendationResponse
s@UpdateBotRecommendationResponse' {} Maybe EncryptionSetting
a -> UpdateBotRecommendationResponse
s {$sel:encryptionSetting:UpdateBotRecommendationResponse' :: Maybe EncryptionSetting
encryptionSetting = Maybe EncryptionSetting
a} :: UpdateBotRecommendationResponse)

-- | A timestamp of the date and time that the bot recommendation was last
-- updated.
updateBotRecommendationResponse_lastUpdatedDateTime :: Lens.Lens' UpdateBotRecommendationResponse (Prelude.Maybe Prelude.UTCTime)
updateBotRecommendationResponse_lastUpdatedDateTime :: Lens' UpdateBotRecommendationResponse (Maybe UTCTime)
updateBotRecommendationResponse_lastUpdatedDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBotRecommendationResponse' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: UpdateBotRecommendationResponse
s@UpdateBotRecommendationResponse' {} Maybe POSIX
a -> UpdateBotRecommendationResponse
s {$sel:lastUpdatedDateTime:UpdateBotRecommendationResponse' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: UpdateBotRecommendationResponse) 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 identifier of the language and locale of the bot recommendation to
-- update. The string must match one of the supported locales. For more
-- information, see
-- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>
updateBotRecommendationResponse_localeId :: Lens.Lens' UpdateBotRecommendationResponse (Prelude.Maybe Prelude.Text)
updateBotRecommendationResponse_localeId :: Lens' UpdateBotRecommendationResponse (Maybe Text)
updateBotRecommendationResponse_localeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBotRecommendationResponse' {Maybe Text
localeId :: Maybe Text
$sel:localeId:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> Maybe Text
localeId} -> Maybe Text
localeId) (\s :: UpdateBotRecommendationResponse
s@UpdateBotRecommendationResponse' {} Maybe Text
a -> UpdateBotRecommendationResponse
s {$sel:localeId:UpdateBotRecommendationResponse' :: Maybe Text
localeId = Maybe Text
a} :: UpdateBotRecommendationResponse)

-- | The object representing the Amazon S3 bucket containing the transcript,
-- as well as the associated metadata.
updateBotRecommendationResponse_transcriptSourceSetting :: Lens.Lens' UpdateBotRecommendationResponse (Prelude.Maybe TranscriptSourceSetting)
updateBotRecommendationResponse_transcriptSourceSetting :: Lens'
  UpdateBotRecommendationResponse (Maybe TranscriptSourceSetting)
updateBotRecommendationResponse_transcriptSourceSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBotRecommendationResponse' {Maybe TranscriptSourceSetting
transcriptSourceSetting :: Maybe TranscriptSourceSetting
$sel:transcriptSourceSetting:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> Maybe TranscriptSourceSetting
transcriptSourceSetting} -> Maybe TranscriptSourceSetting
transcriptSourceSetting) (\s :: UpdateBotRecommendationResponse
s@UpdateBotRecommendationResponse' {} Maybe TranscriptSourceSetting
a -> UpdateBotRecommendationResponse
s {$sel:transcriptSourceSetting:UpdateBotRecommendationResponse' :: Maybe TranscriptSourceSetting
transcriptSourceSetting = Maybe TranscriptSourceSetting
a} :: UpdateBotRecommendationResponse)

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

instance
  Prelude.NFData
    UpdateBotRecommendationResponse
  where
  rnf :: UpdateBotRecommendationResponse -> ()
rnf UpdateBotRecommendationResponse' {Int
Maybe Text
Maybe POSIX
Maybe BotRecommendationStatus
Maybe EncryptionSetting
Maybe TranscriptSourceSetting
httpStatus :: Int
transcriptSourceSetting :: Maybe TranscriptSourceSetting
localeId :: Maybe Text
lastUpdatedDateTime :: Maybe POSIX
encryptionSetting :: Maybe EncryptionSetting
creationDateTime :: Maybe POSIX
botVersion :: Maybe Text
botRecommendationStatus :: Maybe BotRecommendationStatus
botRecommendationId :: Maybe Text
botId :: Maybe Text
$sel:httpStatus:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> Int
$sel:transcriptSourceSetting:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> Maybe TranscriptSourceSetting
$sel:localeId:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> Maybe Text
$sel:lastUpdatedDateTime:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> Maybe POSIX
$sel:encryptionSetting:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> Maybe EncryptionSetting
$sel:creationDateTime:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> Maybe POSIX
$sel:botVersion:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> Maybe Text
$sel:botRecommendationStatus:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> Maybe BotRecommendationStatus
$sel:botRecommendationId:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> Maybe Text
$sel:botId:UpdateBotRecommendationResponse' :: UpdateBotRecommendationResponse -> 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 Text
botRecommendationId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe BotRecommendationStatus
botRecommendationStatus
      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
creationDateTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EncryptionSetting
encryptionSetting
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdatedDateTime
      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 Maybe TranscriptSourceSetting
transcriptSourceSetting
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus