{-# 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.AmplifyBackend.UpdateBackendConfig
-- 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)
--
-- Updates the AWS resources required to access the Amplify Admin UI.
module Amazonka.AmplifyBackend.UpdateBackendConfig
  ( -- * Creating a Request
    UpdateBackendConfig (..),
    newUpdateBackendConfig,

    -- * Request Lenses
    updateBackendConfig_loginAuthConfig,
    updateBackendConfig_appId,

    -- * Destructuring the Response
    UpdateBackendConfigResponse (..),
    newUpdateBackendConfigResponse,

    -- * Response Lenses
    updateBackendConfigResponse_error,
    updateBackendConfigResponse_appId,
    updateBackendConfigResponse_backendManagerAppId,
    updateBackendConfigResponse_loginAuthConfig,
    updateBackendConfigResponse_httpStatus,
  )
where

import Amazonka.AmplifyBackend.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | The request body for UpdateBackendConfig.
--
-- /See:/ 'newUpdateBackendConfig' smart constructor.
data UpdateBackendConfig = UpdateBackendConfig'
  { -- | Describes the Amazon Cognito configuration for Admin UI access.
    UpdateBackendConfig -> Maybe LoginAuthConfigReqObj
loginAuthConfig :: Prelude.Maybe LoginAuthConfigReqObj,
    -- | The app ID.
    UpdateBackendConfig -> Text
appId :: Prelude.Text
  }
  deriving (UpdateBackendConfig -> UpdateBackendConfig -> Bool
(UpdateBackendConfig -> UpdateBackendConfig -> Bool)
-> (UpdateBackendConfig -> UpdateBackendConfig -> Bool)
-> Eq UpdateBackendConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateBackendConfig -> UpdateBackendConfig -> Bool
$c/= :: UpdateBackendConfig -> UpdateBackendConfig -> Bool
== :: UpdateBackendConfig -> UpdateBackendConfig -> Bool
$c== :: UpdateBackendConfig -> UpdateBackendConfig -> Bool
Prelude.Eq, ReadPrec [UpdateBackendConfig]
ReadPrec UpdateBackendConfig
Int -> ReadS UpdateBackendConfig
ReadS [UpdateBackendConfig]
(Int -> ReadS UpdateBackendConfig)
-> ReadS [UpdateBackendConfig]
-> ReadPrec UpdateBackendConfig
-> ReadPrec [UpdateBackendConfig]
-> Read UpdateBackendConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateBackendConfig]
$creadListPrec :: ReadPrec [UpdateBackendConfig]
readPrec :: ReadPrec UpdateBackendConfig
$creadPrec :: ReadPrec UpdateBackendConfig
readList :: ReadS [UpdateBackendConfig]
$creadList :: ReadS [UpdateBackendConfig]
readsPrec :: Int -> ReadS UpdateBackendConfig
$creadsPrec :: Int -> ReadS UpdateBackendConfig
Prelude.Read, Int -> UpdateBackendConfig -> ShowS
[UpdateBackendConfig] -> ShowS
UpdateBackendConfig -> String
(Int -> UpdateBackendConfig -> ShowS)
-> (UpdateBackendConfig -> String)
-> ([UpdateBackendConfig] -> ShowS)
-> Show UpdateBackendConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateBackendConfig] -> ShowS
$cshowList :: [UpdateBackendConfig] -> ShowS
show :: UpdateBackendConfig -> String
$cshow :: UpdateBackendConfig -> String
showsPrec :: Int -> UpdateBackendConfig -> ShowS
$cshowsPrec :: Int -> UpdateBackendConfig -> ShowS
Prelude.Show, (forall x. UpdateBackendConfig -> Rep UpdateBackendConfig x)
-> (forall x. Rep UpdateBackendConfig x -> UpdateBackendConfig)
-> Generic UpdateBackendConfig
forall x. Rep UpdateBackendConfig x -> UpdateBackendConfig
forall x. UpdateBackendConfig -> Rep UpdateBackendConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateBackendConfig x -> UpdateBackendConfig
$cfrom :: forall x. UpdateBackendConfig -> Rep UpdateBackendConfig x
Prelude.Generic)

-- |
-- Create a value of 'UpdateBackendConfig' 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:
--
-- 'loginAuthConfig', 'updateBackendConfig_loginAuthConfig' - Describes the Amazon Cognito configuration for Admin UI access.
--
-- 'appId', 'updateBackendConfig_appId' - The app ID.
newUpdateBackendConfig ::
  -- | 'appId'
  Prelude.Text ->
  UpdateBackendConfig
newUpdateBackendConfig :: Text -> UpdateBackendConfig
newUpdateBackendConfig Text
pAppId_ =
  UpdateBackendConfig' :: Maybe LoginAuthConfigReqObj -> Text -> UpdateBackendConfig
UpdateBackendConfig'
    { $sel:loginAuthConfig:UpdateBackendConfig' :: Maybe LoginAuthConfigReqObj
loginAuthConfig =
        Maybe LoginAuthConfigReqObj
forall a. Maybe a
Prelude.Nothing,
      $sel:appId:UpdateBackendConfig' :: Text
appId = Text
pAppId_
    }

-- | Describes the Amazon Cognito configuration for Admin UI access.
updateBackendConfig_loginAuthConfig :: Lens.Lens' UpdateBackendConfig (Prelude.Maybe LoginAuthConfigReqObj)
updateBackendConfig_loginAuthConfig :: (Maybe LoginAuthConfigReqObj -> f (Maybe LoginAuthConfigReqObj))
-> UpdateBackendConfig -> f UpdateBackendConfig
updateBackendConfig_loginAuthConfig = (UpdateBackendConfig -> Maybe LoginAuthConfigReqObj)
-> (UpdateBackendConfig
    -> Maybe LoginAuthConfigReqObj -> UpdateBackendConfig)
-> Lens
     UpdateBackendConfig
     UpdateBackendConfig
     (Maybe LoginAuthConfigReqObj)
     (Maybe LoginAuthConfigReqObj)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendConfig' {Maybe LoginAuthConfigReqObj
loginAuthConfig :: Maybe LoginAuthConfigReqObj
$sel:loginAuthConfig:UpdateBackendConfig' :: UpdateBackendConfig -> Maybe LoginAuthConfigReqObj
loginAuthConfig} -> Maybe LoginAuthConfigReqObj
loginAuthConfig) (\s :: UpdateBackendConfig
s@UpdateBackendConfig' {} Maybe LoginAuthConfigReqObj
a -> UpdateBackendConfig
s {$sel:loginAuthConfig:UpdateBackendConfig' :: Maybe LoginAuthConfigReqObj
loginAuthConfig = Maybe LoginAuthConfigReqObj
a} :: UpdateBackendConfig)

-- | The app ID.
updateBackendConfig_appId :: Lens.Lens' UpdateBackendConfig Prelude.Text
updateBackendConfig_appId :: (Text -> f Text) -> UpdateBackendConfig -> f UpdateBackendConfig
updateBackendConfig_appId = (UpdateBackendConfig -> Text)
-> (UpdateBackendConfig -> Text -> UpdateBackendConfig)
-> Lens UpdateBackendConfig UpdateBackendConfig Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendConfig' {Text
appId :: Text
$sel:appId:UpdateBackendConfig' :: UpdateBackendConfig -> Text
appId} -> Text
appId) (\s :: UpdateBackendConfig
s@UpdateBackendConfig' {} Text
a -> UpdateBackendConfig
s {$sel:appId:UpdateBackendConfig' :: Text
appId = Text
a} :: UpdateBackendConfig)

instance Core.AWSRequest UpdateBackendConfig where
  type
    AWSResponse UpdateBackendConfig =
      UpdateBackendConfigResponse
  request :: UpdateBackendConfig -> Request UpdateBackendConfig
request = Service -> UpdateBackendConfig -> Request UpdateBackendConfig
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateBackendConfig
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateBackendConfig)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateBackendConfig))
-> Logger
-> Service
-> Proxy UpdateBackendConfig
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateBackendConfig)))
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 LoginAuthConfigReqObj
-> Int
-> UpdateBackendConfigResponse
UpdateBackendConfigResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe LoginAuthConfigReqObj
 -> Int
 -> UpdateBackendConfigResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe LoginAuthConfigReqObj
      -> Int
      -> UpdateBackendConfigResponse)
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
"error")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe LoginAuthConfigReqObj
   -> Int
   -> UpdateBackendConfigResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe LoginAuthConfigReqObj
      -> Int
      -> UpdateBackendConfigResponse)
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
"appId")
            Either
  String
  (Maybe Text
   -> Maybe LoginAuthConfigReqObj
   -> Int
   -> UpdateBackendConfigResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe LoginAuthConfigReqObj -> Int -> UpdateBackendConfigResponse)
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
"backendManagerAppId")
            Either
  String
  (Maybe LoginAuthConfigReqObj -> Int -> UpdateBackendConfigResponse)
-> Either String (Maybe LoginAuthConfigReqObj)
-> Either String (Int -> UpdateBackendConfigResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe LoginAuthConfigReqObj)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"loginAuthConfig")
            Either String (Int -> UpdateBackendConfigResponse)
-> Either String Int -> Either String UpdateBackendConfigResponse
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 UpdateBackendConfig

instance Prelude.NFData UpdateBackendConfig

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

instance Core.ToJSON UpdateBackendConfig where
  toJSON :: UpdateBackendConfig -> Value
toJSON UpdateBackendConfig' {Maybe LoginAuthConfigReqObj
Text
appId :: Text
loginAuthConfig :: Maybe LoginAuthConfigReqObj
$sel:appId:UpdateBackendConfig' :: UpdateBackendConfig -> Text
$sel:loginAuthConfig:UpdateBackendConfig' :: UpdateBackendConfig -> Maybe LoginAuthConfigReqObj
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"loginAuthConfig" Text -> LoginAuthConfigReqObj -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (LoginAuthConfigReqObj -> Pair)
-> Maybe LoginAuthConfigReqObj -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LoginAuthConfigReqObj
loginAuthConfig
          ]
      )

instance Core.ToPath UpdateBackendConfig where
  toPath :: UpdateBackendConfig -> ByteString
toPath UpdateBackendConfig' {Maybe LoginAuthConfigReqObj
Text
appId :: Text
loginAuthConfig :: Maybe LoginAuthConfigReqObj
$sel:appId:UpdateBackendConfig' :: UpdateBackendConfig -> Text
$sel:loginAuthConfig:UpdateBackendConfig' :: UpdateBackendConfig -> Maybe LoginAuthConfigReqObj
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/backend/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
appId, ByteString
"/config/update"]

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

-- | /See:/ 'newUpdateBackendConfigResponse' smart constructor.
data UpdateBackendConfigResponse = UpdateBackendConfigResponse'
  { -- | If the request fails, this error is returned.
    UpdateBackendConfigResponse -> Maybe Text
error :: Prelude.Maybe Prelude.Text,
    -- | The app ID.
    UpdateBackendConfigResponse -> Maybe Text
appId :: Prelude.Maybe Prelude.Text,
    -- | The app ID for the backend manager.
    UpdateBackendConfigResponse -> Maybe Text
backendManagerAppId :: Prelude.Maybe Prelude.Text,
    -- | Describes the Amazon Cognito configurations for the Admin UI auth
    -- resource to log in with.
    UpdateBackendConfigResponse -> Maybe LoginAuthConfigReqObj
loginAuthConfig :: Prelude.Maybe LoginAuthConfigReqObj,
    -- | The response's http status code.
    UpdateBackendConfigResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateBackendConfigResponse -> UpdateBackendConfigResponse -> Bool
(UpdateBackendConfigResponse
 -> UpdateBackendConfigResponse -> Bool)
-> (UpdateBackendConfigResponse
    -> UpdateBackendConfigResponse -> Bool)
-> Eq UpdateBackendConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateBackendConfigResponse -> UpdateBackendConfigResponse -> Bool
$c/= :: UpdateBackendConfigResponse -> UpdateBackendConfigResponse -> Bool
== :: UpdateBackendConfigResponse -> UpdateBackendConfigResponse -> Bool
$c== :: UpdateBackendConfigResponse -> UpdateBackendConfigResponse -> Bool
Prelude.Eq, ReadPrec [UpdateBackendConfigResponse]
ReadPrec UpdateBackendConfigResponse
Int -> ReadS UpdateBackendConfigResponse
ReadS [UpdateBackendConfigResponse]
(Int -> ReadS UpdateBackendConfigResponse)
-> ReadS [UpdateBackendConfigResponse]
-> ReadPrec UpdateBackendConfigResponse
-> ReadPrec [UpdateBackendConfigResponse]
-> Read UpdateBackendConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateBackendConfigResponse]
$creadListPrec :: ReadPrec [UpdateBackendConfigResponse]
readPrec :: ReadPrec UpdateBackendConfigResponse
$creadPrec :: ReadPrec UpdateBackendConfigResponse
readList :: ReadS [UpdateBackendConfigResponse]
$creadList :: ReadS [UpdateBackendConfigResponse]
readsPrec :: Int -> ReadS UpdateBackendConfigResponse
$creadsPrec :: Int -> ReadS UpdateBackendConfigResponse
Prelude.Read, Int -> UpdateBackendConfigResponse -> ShowS
[UpdateBackendConfigResponse] -> ShowS
UpdateBackendConfigResponse -> String
(Int -> UpdateBackendConfigResponse -> ShowS)
-> (UpdateBackendConfigResponse -> String)
-> ([UpdateBackendConfigResponse] -> ShowS)
-> Show UpdateBackendConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateBackendConfigResponse] -> ShowS
$cshowList :: [UpdateBackendConfigResponse] -> ShowS
show :: UpdateBackendConfigResponse -> String
$cshow :: UpdateBackendConfigResponse -> String
showsPrec :: Int -> UpdateBackendConfigResponse -> ShowS
$cshowsPrec :: Int -> UpdateBackendConfigResponse -> ShowS
Prelude.Show, (forall x.
 UpdateBackendConfigResponse -> Rep UpdateBackendConfigResponse x)
-> (forall x.
    Rep UpdateBackendConfigResponse x -> UpdateBackendConfigResponse)
-> Generic UpdateBackendConfigResponse
forall x.
Rep UpdateBackendConfigResponse x -> UpdateBackendConfigResponse
forall x.
UpdateBackendConfigResponse -> Rep UpdateBackendConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateBackendConfigResponse x -> UpdateBackendConfigResponse
$cfrom :: forall x.
UpdateBackendConfigResponse -> Rep UpdateBackendConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateBackendConfigResponse' 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:
--
-- 'error', 'updateBackendConfigResponse_error' - If the request fails, this error is returned.
--
-- 'appId', 'updateBackendConfigResponse_appId' - The app ID.
--
-- 'backendManagerAppId', 'updateBackendConfigResponse_backendManagerAppId' - The app ID for the backend manager.
--
-- 'loginAuthConfig', 'updateBackendConfigResponse_loginAuthConfig' - Describes the Amazon Cognito configurations for the Admin UI auth
-- resource to log in with.
--
-- 'httpStatus', 'updateBackendConfigResponse_httpStatus' - The response's http status code.
newUpdateBackendConfigResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateBackendConfigResponse
newUpdateBackendConfigResponse :: Int -> UpdateBackendConfigResponse
newUpdateBackendConfigResponse Int
pHttpStatus_ =
  UpdateBackendConfigResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe LoginAuthConfigReqObj
-> Int
-> UpdateBackendConfigResponse
UpdateBackendConfigResponse'
    { $sel:error:UpdateBackendConfigResponse' :: Maybe Text
error =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:appId:UpdateBackendConfigResponse' :: Maybe Text
appId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backendManagerAppId:UpdateBackendConfigResponse' :: Maybe Text
backendManagerAppId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:loginAuthConfig:UpdateBackendConfigResponse' :: Maybe LoginAuthConfigReqObj
loginAuthConfig = Maybe LoginAuthConfigReqObj
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateBackendConfigResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If the request fails, this error is returned.
updateBackendConfigResponse_error :: Lens.Lens' UpdateBackendConfigResponse (Prelude.Maybe Prelude.Text)
updateBackendConfigResponse_error :: (Maybe Text -> f (Maybe Text))
-> UpdateBackendConfigResponse -> f UpdateBackendConfigResponse
updateBackendConfigResponse_error = (UpdateBackendConfigResponse -> Maybe Text)
-> (UpdateBackendConfigResponse
    -> Maybe Text -> UpdateBackendConfigResponse)
-> Lens
     UpdateBackendConfigResponse
     UpdateBackendConfigResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendConfigResponse' {Maybe Text
error :: Maybe Text
$sel:error:UpdateBackendConfigResponse' :: UpdateBackendConfigResponse -> Maybe Text
error} -> Maybe Text
error) (\s :: UpdateBackendConfigResponse
s@UpdateBackendConfigResponse' {} Maybe Text
a -> UpdateBackendConfigResponse
s {$sel:error:UpdateBackendConfigResponse' :: Maybe Text
error = Maybe Text
a} :: UpdateBackendConfigResponse)

-- | The app ID.
updateBackendConfigResponse_appId :: Lens.Lens' UpdateBackendConfigResponse (Prelude.Maybe Prelude.Text)
updateBackendConfigResponse_appId :: (Maybe Text -> f (Maybe Text))
-> UpdateBackendConfigResponse -> f UpdateBackendConfigResponse
updateBackendConfigResponse_appId = (UpdateBackendConfigResponse -> Maybe Text)
-> (UpdateBackendConfigResponse
    -> Maybe Text -> UpdateBackendConfigResponse)
-> Lens
     UpdateBackendConfigResponse
     UpdateBackendConfigResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendConfigResponse' {Maybe Text
appId :: Maybe Text
$sel:appId:UpdateBackendConfigResponse' :: UpdateBackendConfigResponse -> Maybe Text
appId} -> Maybe Text
appId) (\s :: UpdateBackendConfigResponse
s@UpdateBackendConfigResponse' {} Maybe Text
a -> UpdateBackendConfigResponse
s {$sel:appId:UpdateBackendConfigResponse' :: Maybe Text
appId = Maybe Text
a} :: UpdateBackendConfigResponse)

-- | The app ID for the backend manager.
updateBackendConfigResponse_backendManagerAppId :: Lens.Lens' UpdateBackendConfigResponse (Prelude.Maybe Prelude.Text)
updateBackendConfigResponse_backendManagerAppId :: (Maybe Text -> f (Maybe Text))
-> UpdateBackendConfigResponse -> f UpdateBackendConfigResponse
updateBackendConfigResponse_backendManagerAppId = (UpdateBackendConfigResponse -> Maybe Text)
-> (UpdateBackendConfigResponse
    -> Maybe Text -> UpdateBackendConfigResponse)
-> Lens
     UpdateBackendConfigResponse
     UpdateBackendConfigResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendConfigResponse' {Maybe Text
backendManagerAppId :: Maybe Text
$sel:backendManagerAppId:UpdateBackendConfigResponse' :: UpdateBackendConfigResponse -> Maybe Text
backendManagerAppId} -> Maybe Text
backendManagerAppId) (\s :: UpdateBackendConfigResponse
s@UpdateBackendConfigResponse' {} Maybe Text
a -> UpdateBackendConfigResponse
s {$sel:backendManagerAppId:UpdateBackendConfigResponse' :: Maybe Text
backendManagerAppId = Maybe Text
a} :: UpdateBackendConfigResponse)

-- | Describes the Amazon Cognito configurations for the Admin UI auth
-- resource to log in with.
updateBackendConfigResponse_loginAuthConfig :: Lens.Lens' UpdateBackendConfigResponse (Prelude.Maybe LoginAuthConfigReqObj)
updateBackendConfigResponse_loginAuthConfig :: (Maybe LoginAuthConfigReqObj -> f (Maybe LoginAuthConfigReqObj))
-> UpdateBackendConfigResponse -> f UpdateBackendConfigResponse
updateBackendConfigResponse_loginAuthConfig = (UpdateBackendConfigResponse -> Maybe LoginAuthConfigReqObj)
-> (UpdateBackendConfigResponse
    -> Maybe LoginAuthConfigReqObj -> UpdateBackendConfigResponse)
-> Lens
     UpdateBackendConfigResponse
     UpdateBackendConfigResponse
     (Maybe LoginAuthConfigReqObj)
     (Maybe LoginAuthConfigReqObj)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendConfigResponse' {Maybe LoginAuthConfigReqObj
loginAuthConfig :: Maybe LoginAuthConfigReqObj
$sel:loginAuthConfig:UpdateBackendConfigResponse' :: UpdateBackendConfigResponse -> Maybe LoginAuthConfigReqObj
loginAuthConfig} -> Maybe LoginAuthConfigReqObj
loginAuthConfig) (\s :: UpdateBackendConfigResponse
s@UpdateBackendConfigResponse' {} Maybe LoginAuthConfigReqObj
a -> UpdateBackendConfigResponse
s {$sel:loginAuthConfig:UpdateBackendConfigResponse' :: Maybe LoginAuthConfigReqObj
loginAuthConfig = Maybe LoginAuthConfigReqObj
a} :: UpdateBackendConfigResponse)

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

instance Prelude.NFData UpdateBackendConfigResponse