{-# 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.DeleteBackendAuth
-- 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)
--
-- Deletes an existing backend authentication resource.
module Amazonka.AmplifyBackend.DeleteBackendAuth
  ( -- * Creating a Request
    DeleteBackendAuth (..),
    newDeleteBackendAuth,

    -- * Request Lenses
    deleteBackendAuth_appId,
    deleteBackendAuth_backendEnvironmentName,
    deleteBackendAuth_resourceName,

    -- * Destructuring the Response
    DeleteBackendAuthResponse (..),
    newDeleteBackendAuthResponse,

    -- * Response Lenses
    deleteBackendAuthResponse_status,
    deleteBackendAuthResponse_jobId,
    deleteBackendAuthResponse_operation,
    deleteBackendAuthResponse_error,
    deleteBackendAuthResponse_appId,
    deleteBackendAuthResponse_backendEnvironmentName,
    deleteBackendAuthResponse_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 DeleteBackendAuth.
--
-- /See:/ 'newDeleteBackendAuth' smart constructor.
data DeleteBackendAuth = DeleteBackendAuth'
  { -- | The app ID.
    DeleteBackendAuth -> Text
appId :: Prelude.Text,
    -- | The name of the backend environment.
    DeleteBackendAuth -> Text
backendEnvironmentName :: Prelude.Text,
    -- | The name of this resource.
    DeleteBackendAuth -> Text
resourceName :: Prelude.Text
  }
  deriving (DeleteBackendAuth -> DeleteBackendAuth -> Bool
(DeleteBackendAuth -> DeleteBackendAuth -> Bool)
-> (DeleteBackendAuth -> DeleteBackendAuth -> Bool)
-> Eq DeleteBackendAuth
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteBackendAuth -> DeleteBackendAuth -> Bool
$c/= :: DeleteBackendAuth -> DeleteBackendAuth -> Bool
== :: DeleteBackendAuth -> DeleteBackendAuth -> Bool
$c== :: DeleteBackendAuth -> DeleteBackendAuth -> Bool
Prelude.Eq, ReadPrec [DeleteBackendAuth]
ReadPrec DeleteBackendAuth
Int -> ReadS DeleteBackendAuth
ReadS [DeleteBackendAuth]
(Int -> ReadS DeleteBackendAuth)
-> ReadS [DeleteBackendAuth]
-> ReadPrec DeleteBackendAuth
-> ReadPrec [DeleteBackendAuth]
-> Read DeleteBackendAuth
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteBackendAuth]
$creadListPrec :: ReadPrec [DeleteBackendAuth]
readPrec :: ReadPrec DeleteBackendAuth
$creadPrec :: ReadPrec DeleteBackendAuth
readList :: ReadS [DeleteBackendAuth]
$creadList :: ReadS [DeleteBackendAuth]
readsPrec :: Int -> ReadS DeleteBackendAuth
$creadsPrec :: Int -> ReadS DeleteBackendAuth
Prelude.Read, Int -> DeleteBackendAuth -> ShowS
[DeleteBackendAuth] -> ShowS
DeleteBackendAuth -> String
(Int -> DeleteBackendAuth -> ShowS)
-> (DeleteBackendAuth -> String)
-> ([DeleteBackendAuth] -> ShowS)
-> Show DeleteBackendAuth
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteBackendAuth] -> ShowS
$cshowList :: [DeleteBackendAuth] -> ShowS
show :: DeleteBackendAuth -> String
$cshow :: DeleteBackendAuth -> String
showsPrec :: Int -> DeleteBackendAuth -> ShowS
$cshowsPrec :: Int -> DeleteBackendAuth -> ShowS
Prelude.Show, (forall x. DeleteBackendAuth -> Rep DeleteBackendAuth x)
-> (forall x. Rep DeleteBackendAuth x -> DeleteBackendAuth)
-> Generic DeleteBackendAuth
forall x. Rep DeleteBackendAuth x -> DeleteBackendAuth
forall x. DeleteBackendAuth -> Rep DeleteBackendAuth x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteBackendAuth x -> DeleteBackendAuth
$cfrom :: forall x. DeleteBackendAuth -> Rep DeleteBackendAuth x
Prelude.Generic)

-- |
-- Create a value of 'DeleteBackendAuth' 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:
--
-- 'appId', 'deleteBackendAuth_appId' - The app ID.
--
-- 'backendEnvironmentName', 'deleteBackendAuth_backendEnvironmentName' - The name of the backend environment.
--
-- 'resourceName', 'deleteBackendAuth_resourceName' - The name of this resource.
newDeleteBackendAuth ::
  -- | 'appId'
  Prelude.Text ->
  -- | 'backendEnvironmentName'
  Prelude.Text ->
  -- | 'resourceName'
  Prelude.Text ->
  DeleteBackendAuth
newDeleteBackendAuth :: Text -> Text -> Text -> DeleteBackendAuth
newDeleteBackendAuth
  Text
pAppId_
  Text
pBackendEnvironmentName_
  Text
pResourceName_ =
    DeleteBackendAuth' :: Text -> Text -> Text -> DeleteBackendAuth
DeleteBackendAuth'
      { $sel:appId:DeleteBackendAuth' :: Text
appId = Text
pAppId_,
        $sel:backendEnvironmentName:DeleteBackendAuth' :: Text
backendEnvironmentName = Text
pBackendEnvironmentName_,
        $sel:resourceName:DeleteBackendAuth' :: Text
resourceName = Text
pResourceName_
      }

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

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

-- | The name of this resource.
deleteBackendAuth_resourceName :: Lens.Lens' DeleteBackendAuth Prelude.Text
deleteBackendAuth_resourceName :: (Text -> f Text) -> DeleteBackendAuth -> f DeleteBackendAuth
deleteBackendAuth_resourceName = (DeleteBackendAuth -> Text)
-> (DeleteBackendAuth -> Text -> DeleteBackendAuth)
-> Lens DeleteBackendAuth DeleteBackendAuth Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteBackendAuth' {Text
resourceName :: Text
$sel:resourceName:DeleteBackendAuth' :: DeleteBackendAuth -> Text
resourceName} -> Text
resourceName) (\s :: DeleteBackendAuth
s@DeleteBackendAuth' {} Text
a -> DeleteBackendAuth
s {$sel:resourceName:DeleteBackendAuth' :: Text
resourceName = Text
a} :: DeleteBackendAuth)

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

instance Prelude.NFData DeleteBackendAuth

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

instance Core.ToPath DeleteBackendAuth where
  toPath :: DeleteBackendAuth -> ByteString
toPath DeleteBackendAuth' {Text
resourceName :: Text
backendEnvironmentName :: Text
appId :: Text
$sel:resourceName:DeleteBackendAuth' :: DeleteBackendAuth -> Text
$sel:backendEnvironmentName:DeleteBackendAuth' :: DeleteBackendAuth -> Text
$sel:appId:DeleteBackendAuth' :: DeleteBackendAuth -> 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
"/auth/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
backendEnvironmentName,
        ByteString
"/remove"
      ]

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

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

-- |
-- Create a value of 'DeleteBackendAuthResponse' 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', 'deleteBackendAuthResponse_status' - The current status of the request.
--
-- 'jobId', 'deleteBackendAuthResponse_jobId' - The ID for the job.
--
-- 'operation', 'deleteBackendAuthResponse_operation' - The name of the operation.
--
-- 'error', 'deleteBackendAuthResponse_error' - If the request fails, this error is returned.
--
-- 'appId', 'deleteBackendAuthResponse_appId' - The app ID.
--
-- 'backendEnvironmentName', 'deleteBackendAuthResponse_backendEnvironmentName' - The name of the backend environment.
--
-- 'httpStatus', 'deleteBackendAuthResponse_httpStatus' - The response's http status code.
newDeleteBackendAuthResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteBackendAuthResponse
newDeleteBackendAuthResponse :: Int -> DeleteBackendAuthResponse
newDeleteBackendAuthResponse Int
pHttpStatus_ =
  DeleteBackendAuthResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DeleteBackendAuthResponse
DeleteBackendAuthResponse'
    { $sel:status:DeleteBackendAuthResponse' :: Maybe Text
status =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:DeleteBackendAuthResponse' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:operation:DeleteBackendAuthResponse' :: Maybe Text
operation = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:error:DeleteBackendAuthResponse' :: Maybe Text
error = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:appId:DeleteBackendAuthResponse' :: Maybe Text
appId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backendEnvironmentName:DeleteBackendAuthResponse' :: Maybe Text
backendEnvironmentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DeleteBackendAuthResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

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

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

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

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

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

instance Prelude.NFData DeleteBackendAuthResponse