{-# 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.Glue.BatchDeleteConnection
-- 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 a list of connection definitions from the Data Catalog.
module Amazonka.Glue.BatchDeleteConnection
  ( -- * Creating a Request
    BatchDeleteConnection (..),
    newBatchDeleteConnection,

    -- * Request Lenses
    batchDeleteConnection_catalogId,
    batchDeleteConnection_connectionNameList,

    -- * Destructuring the Response
    BatchDeleteConnectionResponse (..),
    newBatchDeleteConnectionResponse,

    -- * Response Lenses
    batchDeleteConnectionResponse_succeeded,
    batchDeleteConnectionResponse_errors,
    batchDeleteConnectionResponse_httpStatus,
  )
where

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

-- | /See:/ 'newBatchDeleteConnection' smart constructor.
data BatchDeleteConnection = BatchDeleteConnection'
  { -- | The ID of the Data Catalog in which the connections reside. If none is
    -- provided, the Amazon Web Services account ID is used by default.
    BatchDeleteConnection -> Maybe Text
catalogId :: Prelude.Maybe Prelude.Text,
    -- | A list of names of the connections to delete.
    BatchDeleteConnection -> [Text]
connectionNameList :: [Prelude.Text]
  }
  deriving (BatchDeleteConnection -> BatchDeleteConnection -> Bool
(BatchDeleteConnection -> BatchDeleteConnection -> Bool)
-> (BatchDeleteConnection -> BatchDeleteConnection -> Bool)
-> Eq BatchDeleteConnection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDeleteConnection -> BatchDeleteConnection -> Bool
$c/= :: BatchDeleteConnection -> BatchDeleteConnection -> Bool
== :: BatchDeleteConnection -> BatchDeleteConnection -> Bool
$c== :: BatchDeleteConnection -> BatchDeleteConnection -> Bool
Prelude.Eq, ReadPrec [BatchDeleteConnection]
ReadPrec BatchDeleteConnection
Int -> ReadS BatchDeleteConnection
ReadS [BatchDeleteConnection]
(Int -> ReadS BatchDeleteConnection)
-> ReadS [BatchDeleteConnection]
-> ReadPrec BatchDeleteConnection
-> ReadPrec [BatchDeleteConnection]
-> Read BatchDeleteConnection
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDeleteConnection]
$creadListPrec :: ReadPrec [BatchDeleteConnection]
readPrec :: ReadPrec BatchDeleteConnection
$creadPrec :: ReadPrec BatchDeleteConnection
readList :: ReadS [BatchDeleteConnection]
$creadList :: ReadS [BatchDeleteConnection]
readsPrec :: Int -> ReadS BatchDeleteConnection
$creadsPrec :: Int -> ReadS BatchDeleteConnection
Prelude.Read, Int -> BatchDeleteConnection -> ShowS
[BatchDeleteConnection] -> ShowS
BatchDeleteConnection -> String
(Int -> BatchDeleteConnection -> ShowS)
-> (BatchDeleteConnection -> String)
-> ([BatchDeleteConnection] -> ShowS)
-> Show BatchDeleteConnection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDeleteConnection] -> ShowS
$cshowList :: [BatchDeleteConnection] -> ShowS
show :: BatchDeleteConnection -> String
$cshow :: BatchDeleteConnection -> String
showsPrec :: Int -> BatchDeleteConnection -> ShowS
$cshowsPrec :: Int -> BatchDeleteConnection -> ShowS
Prelude.Show, (forall x. BatchDeleteConnection -> Rep BatchDeleteConnection x)
-> (forall x. Rep BatchDeleteConnection x -> BatchDeleteConnection)
-> Generic BatchDeleteConnection
forall x. Rep BatchDeleteConnection x -> BatchDeleteConnection
forall x. BatchDeleteConnection -> Rep BatchDeleteConnection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchDeleteConnection x -> BatchDeleteConnection
$cfrom :: forall x. BatchDeleteConnection -> Rep BatchDeleteConnection x
Prelude.Generic)

-- |
-- Create a value of 'BatchDeleteConnection' 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:
--
-- 'catalogId', 'batchDeleteConnection_catalogId' - The ID of the Data Catalog in which the connections reside. If none is
-- provided, the Amazon Web Services account ID is used by default.
--
-- 'connectionNameList', 'batchDeleteConnection_connectionNameList' - A list of names of the connections to delete.
newBatchDeleteConnection ::
  BatchDeleteConnection
newBatchDeleteConnection :: BatchDeleteConnection
newBatchDeleteConnection =
  BatchDeleteConnection' :: Maybe Text -> [Text] -> BatchDeleteConnection
BatchDeleteConnection'
    { $sel:catalogId:BatchDeleteConnection' :: Maybe Text
catalogId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:connectionNameList:BatchDeleteConnection' :: [Text]
connectionNameList = [Text]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The ID of the Data Catalog in which the connections reside. If none is
-- provided, the Amazon Web Services account ID is used by default.
batchDeleteConnection_catalogId :: Lens.Lens' BatchDeleteConnection (Prelude.Maybe Prelude.Text)
batchDeleteConnection_catalogId :: (Maybe Text -> f (Maybe Text))
-> BatchDeleteConnection -> f BatchDeleteConnection
batchDeleteConnection_catalogId = (BatchDeleteConnection -> Maybe Text)
-> (BatchDeleteConnection -> Maybe Text -> BatchDeleteConnection)
-> Lens
     BatchDeleteConnection
     BatchDeleteConnection
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDeleteConnection' {Maybe Text
catalogId :: Maybe Text
$sel:catalogId:BatchDeleteConnection' :: BatchDeleteConnection -> Maybe Text
catalogId} -> Maybe Text
catalogId) (\s :: BatchDeleteConnection
s@BatchDeleteConnection' {} Maybe Text
a -> BatchDeleteConnection
s {$sel:catalogId:BatchDeleteConnection' :: Maybe Text
catalogId = Maybe Text
a} :: BatchDeleteConnection)

-- | A list of names of the connections to delete.
batchDeleteConnection_connectionNameList :: Lens.Lens' BatchDeleteConnection [Prelude.Text]
batchDeleteConnection_connectionNameList :: ([Text] -> f [Text])
-> BatchDeleteConnection -> f BatchDeleteConnection
batchDeleteConnection_connectionNameList = (BatchDeleteConnection -> [Text])
-> (BatchDeleteConnection -> [Text] -> BatchDeleteConnection)
-> Lens BatchDeleteConnection BatchDeleteConnection [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDeleteConnection' {[Text]
connectionNameList :: [Text]
$sel:connectionNameList:BatchDeleteConnection' :: BatchDeleteConnection -> [Text]
connectionNameList} -> [Text]
connectionNameList) (\s :: BatchDeleteConnection
s@BatchDeleteConnection' {} [Text]
a -> BatchDeleteConnection
s {$sel:connectionNameList:BatchDeleteConnection' :: [Text]
connectionNameList = [Text]
a} :: BatchDeleteConnection) (([Text] -> f [Text])
 -> BatchDeleteConnection -> f BatchDeleteConnection)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> BatchDeleteConnection
-> f BatchDeleteConnection
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest BatchDeleteConnection where
  type
    AWSResponse BatchDeleteConnection =
      BatchDeleteConnectionResponse
  request :: BatchDeleteConnection -> Request BatchDeleteConnection
request = Service -> BatchDeleteConnection -> Request BatchDeleteConnection
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy BatchDeleteConnection
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse BatchDeleteConnection)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse BatchDeleteConnection))
-> Logger
-> Service
-> Proxy BatchDeleteConnection
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse BatchDeleteConnection)))
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 (HashMap Text ErrorDetail)
-> Int
-> BatchDeleteConnectionResponse
BatchDeleteConnectionResponse'
            (Maybe [Text]
 -> Maybe (HashMap Text ErrorDetail)
 -> Int
 -> BatchDeleteConnectionResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe (HashMap Text ErrorDetail)
      -> Int -> BatchDeleteConnectionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Succeeded" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe (HashMap Text ErrorDetail)
   -> Int -> BatchDeleteConnectionResponse)
-> Either String (Maybe (HashMap Text ErrorDetail))
-> Either String (Int -> BatchDeleteConnectionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Either String (Maybe (Maybe (HashMap Text ErrorDetail)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Errors" Either String (Maybe (Maybe (HashMap Text ErrorDetail)))
-> Maybe (HashMap Text ErrorDetail)
-> Either String (Maybe (HashMap Text ErrorDetail))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text ErrorDetail)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> BatchDeleteConnectionResponse)
-> Either String Int -> Either String BatchDeleteConnectionResponse
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 BatchDeleteConnection

instance Prelude.NFData BatchDeleteConnection

instance Core.ToHeaders BatchDeleteConnection where
  toHeaders :: BatchDeleteConnection -> ResponseHeaders
toHeaders =
    ResponseHeaders -> BatchDeleteConnection -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSGlue.BatchDeleteConnection" ::
                          Prelude.ByteString
                      ),
            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 BatchDeleteConnection where
  toJSON :: BatchDeleteConnection -> Value
toJSON BatchDeleteConnection' {[Text]
Maybe Text
connectionNameList :: [Text]
catalogId :: Maybe Text
$sel:connectionNameList:BatchDeleteConnection' :: BatchDeleteConnection -> [Text]
$sel:catalogId:BatchDeleteConnection' :: BatchDeleteConnection -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"CatalogId" 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
catalogId,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ConnectionNameList" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
connectionNameList)
          ]
      )

instance Core.ToPath BatchDeleteConnection where
  toPath :: BatchDeleteConnection -> ByteString
toPath = ByteString -> BatchDeleteConnection -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newBatchDeleteConnectionResponse' smart constructor.
data BatchDeleteConnectionResponse = BatchDeleteConnectionResponse'
  { -- | A list of names of the connection definitions that were successfully
    -- deleted.
    BatchDeleteConnectionResponse -> Maybe [Text]
succeeded :: Prelude.Maybe [Prelude.Text],
    -- | A map of the names of connections that were not successfully deleted to
    -- error details.
    BatchDeleteConnectionResponse -> Maybe (HashMap Text ErrorDetail)
errors :: Prelude.Maybe (Prelude.HashMap Prelude.Text ErrorDetail),
    -- | The response's http status code.
    BatchDeleteConnectionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (BatchDeleteConnectionResponse
-> BatchDeleteConnectionResponse -> Bool
(BatchDeleteConnectionResponse
 -> BatchDeleteConnectionResponse -> Bool)
-> (BatchDeleteConnectionResponse
    -> BatchDeleteConnectionResponse -> Bool)
-> Eq BatchDeleteConnectionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDeleteConnectionResponse
-> BatchDeleteConnectionResponse -> Bool
$c/= :: BatchDeleteConnectionResponse
-> BatchDeleteConnectionResponse -> Bool
== :: BatchDeleteConnectionResponse
-> BatchDeleteConnectionResponse -> Bool
$c== :: BatchDeleteConnectionResponse
-> BatchDeleteConnectionResponse -> Bool
Prelude.Eq, ReadPrec [BatchDeleteConnectionResponse]
ReadPrec BatchDeleteConnectionResponse
Int -> ReadS BatchDeleteConnectionResponse
ReadS [BatchDeleteConnectionResponse]
(Int -> ReadS BatchDeleteConnectionResponse)
-> ReadS [BatchDeleteConnectionResponse]
-> ReadPrec BatchDeleteConnectionResponse
-> ReadPrec [BatchDeleteConnectionResponse]
-> Read BatchDeleteConnectionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDeleteConnectionResponse]
$creadListPrec :: ReadPrec [BatchDeleteConnectionResponse]
readPrec :: ReadPrec BatchDeleteConnectionResponse
$creadPrec :: ReadPrec BatchDeleteConnectionResponse
readList :: ReadS [BatchDeleteConnectionResponse]
$creadList :: ReadS [BatchDeleteConnectionResponse]
readsPrec :: Int -> ReadS BatchDeleteConnectionResponse
$creadsPrec :: Int -> ReadS BatchDeleteConnectionResponse
Prelude.Read, Int -> BatchDeleteConnectionResponse -> ShowS
[BatchDeleteConnectionResponse] -> ShowS
BatchDeleteConnectionResponse -> String
(Int -> BatchDeleteConnectionResponse -> ShowS)
-> (BatchDeleteConnectionResponse -> String)
-> ([BatchDeleteConnectionResponse] -> ShowS)
-> Show BatchDeleteConnectionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDeleteConnectionResponse] -> ShowS
$cshowList :: [BatchDeleteConnectionResponse] -> ShowS
show :: BatchDeleteConnectionResponse -> String
$cshow :: BatchDeleteConnectionResponse -> String
showsPrec :: Int -> BatchDeleteConnectionResponse -> ShowS
$cshowsPrec :: Int -> BatchDeleteConnectionResponse -> ShowS
Prelude.Show, (forall x.
 BatchDeleteConnectionResponse
 -> Rep BatchDeleteConnectionResponse x)
-> (forall x.
    Rep BatchDeleteConnectionResponse x
    -> BatchDeleteConnectionResponse)
-> Generic BatchDeleteConnectionResponse
forall x.
Rep BatchDeleteConnectionResponse x
-> BatchDeleteConnectionResponse
forall x.
BatchDeleteConnectionResponse
-> Rep BatchDeleteConnectionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchDeleteConnectionResponse x
-> BatchDeleteConnectionResponse
$cfrom :: forall x.
BatchDeleteConnectionResponse
-> Rep BatchDeleteConnectionResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchDeleteConnectionResponse' 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:
--
-- 'succeeded', 'batchDeleteConnectionResponse_succeeded' - A list of names of the connection definitions that were successfully
-- deleted.
--
-- 'errors', 'batchDeleteConnectionResponse_errors' - A map of the names of connections that were not successfully deleted to
-- error details.
--
-- 'httpStatus', 'batchDeleteConnectionResponse_httpStatus' - The response's http status code.
newBatchDeleteConnectionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BatchDeleteConnectionResponse
newBatchDeleteConnectionResponse :: Int -> BatchDeleteConnectionResponse
newBatchDeleteConnectionResponse Int
pHttpStatus_ =
  BatchDeleteConnectionResponse' :: Maybe [Text]
-> Maybe (HashMap Text ErrorDetail)
-> Int
-> BatchDeleteConnectionResponse
BatchDeleteConnectionResponse'
    { $sel:succeeded:BatchDeleteConnectionResponse' :: Maybe [Text]
succeeded =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:errors:BatchDeleteConnectionResponse' :: Maybe (HashMap Text ErrorDetail)
errors = Maybe (HashMap Text ErrorDetail)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:BatchDeleteConnectionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of names of the connection definitions that were successfully
-- deleted.
batchDeleteConnectionResponse_succeeded :: Lens.Lens' BatchDeleteConnectionResponse (Prelude.Maybe [Prelude.Text])
batchDeleteConnectionResponse_succeeded :: (Maybe [Text] -> f (Maybe [Text]))
-> BatchDeleteConnectionResponse -> f BatchDeleteConnectionResponse
batchDeleteConnectionResponse_succeeded = (BatchDeleteConnectionResponse -> Maybe [Text])
-> (BatchDeleteConnectionResponse
    -> Maybe [Text] -> BatchDeleteConnectionResponse)
-> Lens
     BatchDeleteConnectionResponse
     BatchDeleteConnectionResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDeleteConnectionResponse' {Maybe [Text]
succeeded :: Maybe [Text]
$sel:succeeded:BatchDeleteConnectionResponse' :: BatchDeleteConnectionResponse -> Maybe [Text]
succeeded} -> Maybe [Text]
succeeded) (\s :: BatchDeleteConnectionResponse
s@BatchDeleteConnectionResponse' {} Maybe [Text]
a -> BatchDeleteConnectionResponse
s {$sel:succeeded:BatchDeleteConnectionResponse' :: Maybe [Text]
succeeded = Maybe [Text]
a} :: BatchDeleteConnectionResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> BatchDeleteConnectionResponse
 -> f BatchDeleteConnectionResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> BatchDeleteConnectionResponse
-> f BatchDeleteConnectionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A map of the names of connections that were not successfully deleted to
-- error details.
batchDeleteConnectionResponse_errors :: Lens.Lens' BatchDeleteConnectionResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text ErrorDetail))
batchDeleteConnectionResponse_errors :: (Maybe (HashMap Text ErrorDetail)
 -> f (Maybe (HashMap Text ErrorDetail)))
-> BatchDeleteConnectionResponse -> f BatchDeleteConnectionResponse
batchDeleteConnectionResponse_errors = (BatchDeleteConnectionResponse -> Maybe (HashMap Text ErrorDetail))
-> (BatchDeleteConnectionResponse
    -> Maybe (HashMap Text ErrorDetail)
    -> BatchDeleteConnectionResponse)
-> Lens
     BatchDeleteConnectionResponse
     BatchDeleteConnectionResponse
     (Maybe (HashMap Text ErrorDetail))
     (Maybe (HashMap Text ErrorDetail))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDeleteConnectionResponse' {Maybe (HashMap Text ErrorDetail)
errors :: Maybe (HashMap Text ErrorDetail)
$sel:errors:BatchDeleteConnectionResponse' :: BatchDeleteConnectionResponse -> Maybe (HashMap Text ErrorDetail)
errors} -> Maybe (HashMap Text ErrorDetail)
errors) (\s :: BatchDeleteConnectionResponse
s@BatchDeleteConnectionResponse' {} Maybe (HashMap Text ErrorDetail)
a -> BatchDeleteConnectionResponse
s {$sel:errors:BatchDeleteConnectionResponse' :: Maybe (HashMap Text ErrorDetail)
errors = Maybe (HashMap Text ErrorDetail)
a} :: BatchDeleteConnectionResponse) ((Maybe (HashMap Text ErrorDetail)
  -> f (Maybe (HashMap Text ErrorDetail)))
 -> BatchDeleteConnectionResponse
 -> f BatchDeleteConnectionResponse)
-> ((Maybe (HashMap Text ErrorDetail)
     -> f (Maybe (HashMap Text ErrorDetail)))
    -> Maybe (HashMap Text ErrorDetail)
    -> f (Maybe (HashMap Text ErrorDetail)))
-> (Maybe (HashMap Text ErrorDetail)
    -> f (Maybe (HashMap Text ErrorDetail)))
-> BatchDeleteConnectionResponse
-> f BatchDeleteConnectionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text ErrorDetail)
  (HashMap Text ErrorDetail)
  (HashMap Text ErrorDetail)
  (HashMap Text ErrorDetail)
-> Iso
     (Maybe (HashMap Text ErrorDetail))
     (Maybe (HashMap Text ErrorDetail))
     (Maybe (HashMap Text ErrorDetail))
     (Maybe (HashMap Text ErrorDetail))
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 AnIso
  (HashMap Text ErrorDetail)
  (HashMap Text ErrorDetail)
  (HashMap Text ErrorDetail)
  (HashMap Text ErrorDetail)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData BatchDeleteConnectionResponse