{-# 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.CreateBackendConfig
-- 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)
--
-- Creates a config object for a backend.
module Amazonka.AmplifyBackend.CreateBackendConfig
  ( -- * Creating a Request
    CreateBackendConfig (..),
    newCreateBackendConfig,

    -- * Request Lenses
    createBackendConfig_backendManagerAppId,
    createBackendConfig_appId,

    -- * Destructuring the Response
    CreateBackendConfigResponse (..),
    newCreateBackendConfigResponse,

    -- * Response Lenses
    createBackendConfigResponse_status,
    createBackendConfigResponse_jobId,
    createBackendConfigResponse_appId,
    createBackendConfigResponse_backendEnvironmentName,
    createBackendConfigResponse_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 CreateBackendConfig.
--
-- /See:/ 'newCreateBackendConfig' smart constructor.
data CreateBackendConfig = CreateBackendConfig'
  { -- | The app ID for the backend manager.
    CreateBackendConfig -> Maybe Text
backendManagerAppId :: Prelude.Maybe Prelude.Text,
    -- | The app ID.
    CreateBackendConfig -> Text
appId :: Prelude.Text
  }
  deriving (CreateBackendConfig -> CreateBackendConfig -> Bool
(CreateBackendConfig -> CreateBackendConfig -> Bool)
-> (CreateBackendConfig -> CreateBackendConfig -> Bool)
-> Eq CreateBackendConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateBackendConfig -> CreateBackendConfig -> Bool
$c/= :: CreateBackendConfig -> CreateBackendConfig -> Bool
== :: CreateBackendConfig -> CreateBackendConfig -> Bool
$c== :: CreateBackendConfig -> CreateBackendConfig -> Bool
Prelude.Eq, ReadPrec [CreateBackendConfig]
ReadPrec CreateBackendConfig
Int -> ReadS CreateBackendConfig
ReadS [CreateBackendConfig]
(Int -> ReadS CreateBackendConfig)
-> ReadS [CreateBackendConfig]
-> ReadPrec CreateBackendConfig
-> ReadPrec [CreateBackendConfig]
-> Read CreateBackendConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateBackendConfig]
$creadListPrec :: ReadPrec [CreateBackendConfig]
readPrec :: ReadPrec CreateBackendConfig
$creadPrec :: ReadPrec CreateBackendConfig
readList :: ReadS [CreateBackendConfig]
$creadList :: ReadS [CreateBackendConfig]
readsPrec :: Int -> ReadS CreateBackendConfig
$creadsPrec :: Int -> ReadS CreateBackendConfig
Prelude.Read, Int -> CreateBackendConfig -> ShowS
[CreateBackendConfig] -> ShowS
CreateBackendConfig -> String
(Int -> CreateBackendConfig -> ShowS)
-> (CreateBackendConfig -> String)
-> ([CreateBackendConfig] -> ShowS)
-> Show CreateBackendConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateBackendConfig] -> ShowS
$cshowList :: [CreateBackendConfig] -> ShowS
show :: CreateBackendConfig -> String
$cshow :: CreateBackendConfig -> String
showsPrec :: Int -> CreateBackendConfig -> ShowS
$cshowsPrec :: Int -> CreateBackendConfig -> ShowS
Prelude.Show, (forall x. CreateBackendConfig -> Rep CreateBackendConfig x)
-> (forall x. Rep CreateBackendConfig x -> CreateBackendConfig)
-> Generic CreateBackendConfig
forall x. Rep CreateBackendConfig x -> CreateBackendConfig
forall x. CreateBackendConfig -> Rep CreateBackendConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateBackendConfig x -> CreateBackendConfig
$cfrom :: forall x. CreateBackendConfig -> Rep CreateBackendConfig x
Prelude.Generic)

-- |
-- Create a value of 'CreateBackendConfig' 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:
--
-- 'backendManagerAppId', 'createBackendConfig_backendManagerAppId' - The app ID for the backend manager.
--
-- 'appId', 'createBackendConfig_appId' - The app ID.
newCreateBackendConfig ::
  -- | 'appId'
  Prelude.Text ->
  CreateBackendConfig
newCreateBackendConfig :: Text -> CreateBackendConfig
newCreateBackendConfig Text
pAppId_ =
  CreateBackendConfig' :: Maybe Text -> Text -> CreateBackendConfig
CreateBackendConfig'
    { $sel:backendManagerAppId:CreateBackendConfig' :: Maybe Text
backendManagerAppId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:appId:CreateBackendConfig' :: Text
appId = Text
pAppId_
    }

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

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

instance Core.AWSRequest CreateBackendConfig where
  type
    AWSResponse CreateBackendConfig =
      CreateBackendConfigResponse
  request :: CreateBackendConfig -> Request CreateBackendConfig
request = Service -> CreateBackendConfig -> Request CreateBackendConfig
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateBackendConfig
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateBackendConfig)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateBackendConfig))
-> Logger
-> Service
-> Proxy CreateBackendConfig
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateBackendConfig)))
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 Text
-> Int
-> CreateBackendConfigResponse
CreateBackendConfigResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> CreateBackendConfigResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Int -> CreateBackendConfigResponse)
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
"status")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Int -> CreateBackendConfigResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Maybe Text -> Int -> CreateBackendConfigResponse)
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
"jobId")
            Either
  String
  (Maybe Text -> Maybe Text -> Int -> CreateBackendConfigResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> CreateBackendConfigResponse)
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 -> Int -> CreateBackendConfigResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateBackendConfigResponse)
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
"backendEnvironmentName")
            Either String (Int -> CreateBackendConfigResponse)
-> Either String Int -> Either String CreateBackendConfigResponse
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 CreateBackendConfig

instance Prelude.NFData CreateBackendConfig

instance Core.ToHeaders CreateBackendConfig where
  toHeaders :: CreateBackendConfig -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateBackendConfig -> 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 CreateBackendConfig where
  toJSON :: CreateBackendConfig -> Value
toJSON CreateBackendConfig' {Maybe Text
Text
appId :: Text
backendManagerAppId :: Maybe Text
$sel:appId:CreateBackendConfig' :: CreateBackendConfig -> Text
$sel:backendManagerAppId:CreateBackendConfig' :: CreateBackendConfig -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"backendManagerAppId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
backendManagerAppId
          ]
      )

instance Core.ToPath CreateBackendConfig where
  toPath :: CreateBackendConfig -> ByteString
toPath CreateBackendConfig' {Maybe Text
Text
appId :: Text
backendManagerAppId :: Maybe Text
$sel:appId:CreateBackendConfig' :: CreateBackendConfig -> Text
$sel:backendManagerAppId:CreateBackendConfig' :: CreateBackendConfig -> Maybe Text
..} =
    [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"]

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

-- | /See:/ 'newCreateBackendConfigResponse' smart constructor.
data CreateBackendConfigResponse = CreateBackendConfigResponse'
  { -- | The current status of the request.
    CreateBackendConfigResponse -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The ID for the job.
    CreateBackendConfigResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | The app ID.
    CreateBackendConfigResponse -> Maybe Text
appId :: Prelude.Maybe Prelude.Text,
    -- | The name of the backend environment.
    CreateBackendConfigResponse -> Maybe Text
backendEnvironmentName :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateBackendConfigResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateBackendConfigResponse -> CreateBackendConfigResponse -> Bool
(CreateBackendConfigResponse
 -> CreateBackendConfigResponse -> Bool)
-> (CreateBackendConfigResponse
    -> CreateBackendConfigResponse -> Bool)
-> Eq CreateBackendConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateBackendConfigResponse -> CreateBackendConfigResponse -> Bool
$c/= :: CreateBackendConfigResponse -> CreateBackendConfigResponse -> Bool
== :: CreateBackendConfigResponse -> CreateBackendConfigResponse -> Bool
$c== :: CreateBackendConfigResponse -> CreateBackendConfigResponse -> Bool
Prelude.Eq, ReadPrec [CreateBackendConfigResponse]
ReadPrec CreateBackendConfigResponse
Int -> ReadS CreateBackendConfigResponse
ReadS [CreateBackendConfigResponse]
(Int -> ReadS CreateBackendConfigResponse)
-> ReadS [CreateBackendConfigResponse]
-> ReadPrec CreateBackendConfigResponse
-> ReadPrec [CreateBackendConfigResponse]
-> Read CreateBackendConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateBackendConfigResponse]
$creadListPrec :: ReadPrec [CreateBackendConfigResponse]
readPrec :: ReadPrec CreateBackendConfigResponse
$creadPrec :: ReadPrec CreateBackendConfigResponse
readList :: ReadS [CreateBackendConfigResponse]
$creadList :: ReadS [CreateBackendConfigResponse]
readsPrec :: Int -> ReadS CreateBackendConfigResponse
$creadsPrec :: Int -> ReadS CreateBackendConfigResponse
Prelude.Read, Int -> CreateBackendConfigResponse -> ShowS
[CreateBackendConfigResponse] -> ShowS
CreateBackendConfigResponse -> String
(Int -> CreateBackendConfigResponse -> ShowS)
-> (CreateBackendConfigResponse -> String)
-> ([CreateBackendConfigResponse] -> ShowS)
-> Show CreateBackendConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateBackendConfigResponse] -> ShowS
$cshowList :: [CreateBackendConfigResponse] -> ShowS
show :: CreateBackendConfigResponse -> String
$cshow :: CreateBackendConfigResponse -> String
showsPrec :: Int -> CreateBackendConfigResponse -> ShowS
$cshowsPrec :: Int -> CreateBackendConfigResponse -> ShowS
Prelude.Show, (forall x.
 CreateBackendConfigResponse -> Rep CreateBackendConfigResponse x)
-> (forall x.
    Rep CreateBackendConfigResponse x -> CreateBackendConfigResponse)
-> Generic CreateBackendConfigResponse
forall x.
Rep CreateBackendConfigResponse x -> CreateBackendConfigResponse
forall x.
CreateBackendConfigResponse -> Rep CreateBackendConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateBackendConfigResponse x -> CreateBackendConfigResponse
$cfrom :: forall x.
CreateBackendConfigResponse -> Rep CreateBackendConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateBackendConfigResponse' 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:
--
-- 'status', 'createBackendConfigResponse_status' - The current status of the request.
--
-- 'jobId', 'createBackendConfigResponse_jobId' - The ID for the job.
--
-- 'appId', 'createBackendConfigResponse_appId' - The app ID.
--
-- 'backendEnvironmentName', 'createBackendConfigResponse_backendEnvironmentName' - The name of the backend environment.
--
-- 'httpStatus', 'createBackendConfigResponse_httpStatus' - The response's http status code.
newCreateBackendConfigResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateBackendConfigResponse
newCreateBackendConfigResponse :: Int -> CreateBackendConfigResponse
newCreateBackendConfigResponse Int
pHttpStatus_ =
  CreateBackendConfigResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateBackendConfigResponse
CreateBackendConfigResponse'
    { $sel:status:CreateBackendConfigResponse' :: Maybe Text
status =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:CreateBackendConfigResponse' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:appId:CreateBackendConfigResponse' :: Maybe Text
appId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backendEnvironmentName:CreateBackendConfigResponse' :: Maybe Text
backendEnvironmentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateBackendConfigResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The current status of the request.
createBackendConfigResponse_status :: Lens.Lens' CreateBackendConfigResponse (Prelude.Maybe Prelude.Text)
createBackendConfigResponse_status :: (Maybe Text -> f (Maybe Text))
-> CreateBackendConfigResponse -> f CreateBackendConfigResponse
createBackendConfigResponse_status = (CreateBackendConfigResponse -> Maybe Text)
-> (CreateBackendConfigResponse
    -> Maybe Text -> CreateBackendConfigResponse)
-> Lens
     CreateBackendConfigResponse
     CreateBackendConfigResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBackendConfigResponse' {Maybe Text
status :: Maybe Text
$sel:status:CreateBackendConfigResponse' :: CreateBackendConfigResponse -> Maybe Text
status} -> Maybe Text
status) (\s :: CreateBackendConfigResponse
s@CreateBackendConfigResponse' {} Maybe Text
a -> CreateBackendConfigResponse
s {$sel:status:CreateBackendConfigResponse' :: Maybe Text
status = Maybe Text
a} :: CreateBackendConfigResponse)

-- | The ID for the job.
createBackendConfigResponse_jobId :: Lens.Lens' CreateBackendConfigResponse (Prelude.Maybe Prelude.Text)
createBackendConfigResponse_jobId :: (Maybe Text -> f (Maybe Text))
-> CreateBackendConfigResponse -> f CreateBackendConfigResponse
createBackendConfigResponse_jobId = (CreateBackendConfigResponse -> Maybe Text)
-> (CreateBackendConfigResponse
    -> Maybe Text -> CreateBackendConfigResponse)
-> Lens
     CreateBackendConfigResponse
     CreateBackendConfigResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBackendConfigResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:CreateBackendConfigResponse' :: CreateBackendConfigResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: CreateBackendConfigResponse
s@CreateBackendConfigResponse' {} Maybe Text
a -> CreateBackendConfigResponse
s {$sel:jobId:CreateBackendConfigResponse' :: Maybe Text
jobId = Maybe Text
a} :: CreateBackendConfigResponse)

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

-- | The name of the backend environment.
createBackendConfigResponse_backendEnvironmentName :: Lens.Lens' CreateBackendConfigResponse (Prelude.Maybe Prelude.Text)
createBackendConfigResponse_backendEnvironmentName :: (Maybe Text -> f (Maybe Text))
-> CreateBackendConfigResponse -> f CreateBackendConfigResponse
createBackendConfigResponse_backendEnvironmentName = (CreateBackendConfigResponse -> Maybe Text)
-> (CreateBackendConfigResponse
    -> Maybe Text -> CreateBackendConfigResponse)
-> Lens
     CreateBackendConfigResponse
     CreateBackendConfigResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBackendConfigResponse' {Maybe Text
backendEnvironmentName :: Maybe Text
$sel:backendEnvironmentName:CreateBackendConfigResponse' :: CreateBackendConfigResponse -> Maybe Text
backendEnvironmentName} -> Maybe Text
backendEnvironmentName) (\s :: CreateBackendConfigResponse
s@CreateBackendConfigResponse' {} Maybe Text
a -> CreateBackendConfigResponse
s {$sel:backendEnvironmentName:CreateBackendConfigResponse' :: Maybe Text
backendEnvironmentName = Maybe Text
a} :: CreateBackendConfigResponse)

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

instance Prelude.NFData CreateBackendConfigResponse