{-# 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.LakeFormation.BatchGrantPermissions
-- 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)
--
-- Batch operation to grant permissions to the principal.
module Amazonka.LakeFormation.BatchGrantPermissions
  ( -- * Creating a Request
    BatchGrantPermissions (..),
    newBatchGrantPermissions,

    -- * Request Lenses
    batchGrantPermissions_catalogId,
    batchGrantPermissions_entries,

    -- * Destructuring the Response
    BatchGrantPermissionsResponse (..),
    newBatchGrantPermissionsResponse,

    -- * Response Lenses
    batchGrantPermissionsResponse_failures,
    batchGrantPermissionsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.LakeFormation.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:/ 'newBatchGrantPermissions' smart constructor.
data BatchGrantPermissions = BatchGrantPermissions'
  { -- | The identifier for the Data Catalog. By default, the account ID. The
    -- Data Catalog is the persistent metadata store. It contains database
    -- definitions, table definitions, and other control information to manage
    -- your AWS Lake Formation environment.
    BatchGrantPermissions -> Maybe Text
catalogId :: Prelude.Maybe Prelude.Text,
    -- | A list of up to 20 entries for resource permissions to be granted by
    -- batch operation to the principal.
    BatchGrantPermissions -> [BatchPermissionsRequestEntry]
entries :: [BatchPermissionsRequestEntry]
  }
  deriving (BatchGrantPermissions -> BatchGrantPermissions -> Bool
(BatchGrantPermissions -> BatchGrantPermissions -> Bool)
-> (BatchGrantPermissions -> BatchGrantPermissions -> Bool)
-> Eq BatchGrantPermissions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGrantPermissions -> BatchGrantPermissions -> Bool
$c/= :: BatchGrantPermissions -> BatchGrantPermissions -> Bool
== :: BatchGrantPermissions -> BatchGrantPermissions -> Bool
$c== :: BatchGrantPermissions -> BatchGrantPermissions -> Bool
Prelude.Eq, ReadPrec [BatchGrantPermissions]
ReadPrec BatchGrantPermissions
Int -> ReadS BatchGrantPermissions
ReadS [BatchGrantPermissions]
(Int -> ReadS BatchGrantPermissions)
-> ReadS [BatchGrantPermissions]
-> ReadPrec BatchGrantPermissions
-> ReadPrec [BatchGrantPermissions]
-> Read BatchGrantPermissions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGrantPermissions]
$creadListPrec :: ReadPrec [BatchGrantPermissions]
readPrec :: ReadPrec BatchGrantPermissions
$creadPrec :: ReadPrec BatchGrantPermissions
readList :: ReadS [BatchGrantPermissions]
$creadList :: ReadS [BatchGrantPermissions]
readsPrec :: Int -> ReadS BatchGrantPermissions
$creadsPrec :: Int -> ReadS BatchGrantPermissions
Prelude.Read, Int -> BatchGrantPermissions -> ShowS
[BatchGrantPermissions] -> ShowS
BatchGrantPermissions -> String
(Int -> BatchGrantPermissions -> ShowS)
-> (BatchGrantPermissions -> String)
-> ([BatchGrantPermissions] -> ShowS)
-> Show BatchGrantPermissions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGrantPermissions] -> ShowS
$cshowList :: [BatchGrantPermissions] -> ShowS
show :: BatchGrantPermissions -> String
$cshow :: BatchGrantPermissions -> String
showsPrec :: Int -> BatchGrantPermissions -> ShowS
$cshowsPrec :: Int -> BatchGrantPermissions -> ShowS
Prelude.Show, (forall x. BatchGrantPermissions -> Rep BatchGrantPermissions x)
-> (forall x. Rep BatchGrantPermissions x -> BatchGrantPermissions)
-> Generic BatchGrantPermissions
forall x. Rep BatchGrantPermissions x -> BatchGrantPermissions
forall x. BatchGrantPermissions -> Rep BatchGrantPermissions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchGrantPermissions x -> BatchGrantPermissions
$cfrom :: forall x. BatchGrantPermissions -> Rep BatchGrantPermissions x
Prelude.Generic)

-- |
-- Create a value of 'BatchGrantPermissions' 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', 'batchGrantPermissions_catalogId' - The identifier for the Data Catalog. By default, the account ID. The
-- Data Catalog is the persistent metadata store. It contains database
-- definitions, table definitions, and other control information to manage
-- your AWS Lake Formation environment.
--
-- 'entries', 'batchGrantPermissions_entries' - A list of up to 20 entries for resource permissions to be granted by
-- batch operation to the principal.
newBatchGrantPermissions ::
  BatchGrantPermissions
newBatchGrantPermissions :: BatchGrantPermissions
newBatchGrantPermissions =
  BatchGrantPermissions' :: Maybe Text
-> [BatchPermissionsRequestEntry] -> BatchGrantPermissions
BatchGrantPermissions'
    { $sel:catalogId:BatchGrantPermissions' :: Maybe Text
catalogId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:entries:BatchGrantPermissions' :: [BatchPermissionsRequestEntry]
entries = [BatchPermissionsRequestEntry]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The identifier for the Data Catalog. By default, the account ID. The
-- Data Catalog is the persistent metadata store. It contains database
-- definitions, table definitions, and other control information to manage
-- your AWS Lake Formation environment.
batchGrantPermissions_catalogId :: Lens.Lens' BatchGrantPermissions (Prelude.Maybe Prelude.Text)
batchGrantPermissions_catalogId :: (Maybe Text -> f (Maybe Text))
-> BatchGrantPermissions -> f BatchGrantPermissions
batchGrantPermissions_catalogId = (BatchGrantPermissions -> Maybe Text)
-> (BatchGrantPermissions -> Maybe Text -> BatchGrantPermissions)
-> Lens
     BatchGrantPermissions
     BatchGrantPermissions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGrantPermissions' {Maybe Text
catalogId :: Maybe Text
$sel:catalogId:BatchGrantPermissions' :: BatchGrantPermissions -> Maybe Text
catalogId} -> Maybe Text
catalogId) (\s :: BatchGrantPermissions
s@BatchGrantPermissions' {} Maybe Text
a -> BatchGrantPermissions
s {$sel:catalogId:BatchGrantPermissions' :: Maybe Text
catalogId = Maybe Text
a} :: BatchGrantPermissions)

-- | A list of up to 20 entries for resource permissions to be granted by
-- batch operation to the principal.
batchGrantPermissions_entries :: Lens.Lens' BatchGrantPermissions [BatchPermissionsRequestEntry]
batchGrantPermissions_entries :: ([BatchPermissionsRequestEntry]
 -> f [BatchPermissionsRequestEntry])
-> BatchGrantPermissions -> f BatchGrantPermissions
batchGrantPermissions_entries = (BatchGrantPermissions -> [BatchPermissionsRequestEntry])
-> (BatchGrantPermissions
    -> [BatchPermissionsRequestEntry] -> BatchGrantPermissions)
-> Lens
     BatchGrantPermissions
     BatchGrantPermissions
     [BatchPermissionsRequestEntry]
     [BatchPermissionsRequestEntry]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGrantPermissions' {[BatchPermissionsRequestEntry]
entries :: [BatchPermissionsRequestEntry]
$sel:entries:BatchGrantPermissions' :: BatchGrantPermissions -> [BatchPermissionsRequestEntry]
entries} -> [BatchPermissionsRequestEntry]
entries) (\s :: BatchGrantPermissions
s@BatchGrantPermissions' {} [BatchPermissionsRequestEntry]
a -> BatchGrantPermissions
s {$sel:entries:BatchGrantPermissions' :: [BatchPermissionsRequestEntry]
entries = [BatchPermissionsRequestEntry]
a} :: BatchGrantPermissions) (([BatchPermissionsRequestEntry]
  -> f [BatchPermissionsRequestEntry])
 -> BatchGrantPermissions -> f BatchGrantPermissions)
-> (([BatchPermissionsRequestEntry]
     -> f [BatchPermissionsRequestEntry])
    -> [BatchPermissionsRequestEntry]
    -> f [BatchPermissionsRequestEntry])
-> ([BatchPermissionsRequestEntry]
    -> f [BatchPermissionsRequestEntry])
-> BatchGrantPermissions
-> f BatchGrantPermissions
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([BatchPermissionsRequestEntry]
 -> f [BatchPermissionsRequestEntry])
-> [BatchPermissionsRequestEntry]
-> f [BatchPermissionsRequestEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData BatchGrantPermissions

instance Core.ToHeaders BatchGrantPermissions where
  toHeaders :: BatchGrantPermissions -> ResponseHeaders
toHeaders =
    ResponseHeaders -> BatchGrantPermissions -> 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
"AWSLakeFormation.BatchGrantPermissions" ::
                          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 BatchGrantPermissions where
  toJSON :: BatchGrantPermissions -> Value
toJSON BatchGrantPermissions' {[BatchPermissionsRequestEntry]
Maybe Text
entries :: [BatchPermissionsRequestEntry]
catalogId :: Maybe Text
$sel:entries:BatchGrantPermissions' :: BatchGrantPermissions -> [BatchPermissionsRequestEntry]
$sel:catalogId:BatchGrantPermissions' :: BatchGrantPermissions -> 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
"Entries" Text -> [BatchPermissionsRequestEntry] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [BatchPermissionsRequestEntry]
entries)
          ]
      )

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

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

-- | /See:/ 'newBatchGrantPermissionsResponse' smart constructor.
data BatchGrantPermissionsResponse = BatchGrantPermissionsResponse'
  { -- | A list of failures to grant permissions to the resources.
    BatchGrantPermissionsResponse
-> Maybe [BatchPermissionsFailureEntry]
failures :: Prelude.Maybe [BatchPermissionsFailureEntry],
    -- | The response's http status code.
    BatchGrantPermissionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (BatchGrantPermissionsResponse
-> BatchGrantPermissionsResponse -> Bool
(BatchGrantPermissionsResponse
 -> BatchGrantPermissionsResponse -> Bool)
-> (BatchGrantPermissionsResponse
    -> BatchGrantPermissionsResponse -> Bool)
-> Eq BatchGrantPermissionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGrantPermissionsResponse
-> BatchGrantPermissionsResponse -> Bool
$c/= :: BatchGrantPermissionsResponse
-> BatchGrantPermissionsResponse -> Bool
== :: BatchGrantPermissionsResponse
-> BatchGrantPermissionsResponse -> Bool
$c== :: BatchGrantPermissionsResponse
-> BatchGrantPermissionsResponse -> Bool
Prelude.Eq, ReadPrec [BatchGrantPermissionsResponse]
ReadPrec BatchGrantPermissionsResponse
Int -> ReadS BatchGrantPermissionsResponse
ReadS [BatchGrantPermissionsResponse]
(Int -> ReadS BatchGrantPermissionsResponse)
-> ReadS [BatchGrantPermissionsResponse]
-> ReadPrec BatchGrantPermissionsResponse
-> ReadPrec [BatchGrantPermissionsResponse]
-> Read BatchGrantPermissionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGrantPermissionsResponse]
$creadListPrec :: ReadPrec [BatchGrantPermissionsResponse]
readPrec :: ReadPrec BatchGrantPermissionsResponse
$creadPrec :: ReadPrec BatchGrantPermissionsResponse
readList :: ReadS [BatchGrantPermissionsResponse]
$creadList :: ReadS [BatchGrantPermissionsResponse]
readsPrec :: Int -> ReadS BatchGrantPermissionsResponse
$creadsPrec :: Int -> ReadS BatchGrantPermissionsResponse
Prelude.Read, Int -> BatchGrantPermissionsResponse -> ShowS
[BatchGrantPermissionsResponse] -> ShowS
BatchGrantPermissionsResponse -> String
(Int -> BatchGrantPermissionsResponse -> ShowS)
-> (BatchGrantPermissionsResponse -> String)
-> ([BatchGrantPermissionsResponse] -> ShowS)
-> Show BatchGrantPermissionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGrantPermissionsResponse] -> ShowS
$cshowList :: [BatchGrantPermissionsResponse] -> ShowS
show :: BatchGrantPermissionsResponse -> String
$cshow :: BatchGrantPermissionsResponse -> String
showsPrec :: Int -> BatchGrantPermissionsResponse -> ShowS
$cshowsPrec :: Int -> BatchGrantPermissionsResponse -> ShowS
Prelude.Show, (forall x.
 BatchGrantPermissionsResponse
 -> Rep BatchGrantPermissionsResponse x)
-> (forall x.
    Rep BatchGrantPermissionsResponse x
    -> BatchGrantPermissionsResponse)
-> Generic BatchGrantPermissionsResponse
forall x.
Rep BatchGrantPermissionsResponse x
-> BatchGrantPermissionsResponse
forall x.
BatchGrantPermissionsResponse
-> Rep BatchGrantPermissionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGrantPermissionsResponse x
-> BatchGrantPermissionsResponse
$cfrom :: forall x.
BatchGrantPermissionsResponse
-> Rep BatchGrantPermissionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchGrantPermissionsResponse' 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:
--
-- 'failures', 'batchGrantPermissionsResponse_failures' - A list of failures to grant permissions to the resources.
--
-- 'httpStatus', 'batchGrantPermissionsResponse_httpStatus' - The response's http status code.
newBatchGrantPermissionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BatchGrantPermissionsResponse
newBatchGrantPermissionsResponse :: Int -> BatchGrantPermissionsResponse
newBatchGrantPermissionsResponse Int
pHttpStatus_ =
  BatchGrantPermissionsResponse' :: Maybe [BatchPermissionsFailureEntry]
-> Int -> BatchGrantPermissionsResponse
BatchGrantPermissionsResponse'
    { $sel:failures:BatchGrantPermissionsResponse' :: Maybe [BatchPermissionsFailureEntry]
failures =
        Maybe [BatchPermissionsFailureEntry]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:BatchGrantPermissionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of failures to grant permissions to the resources.
batchGrantPermissionsResponse_failures :: Lens.Lens' BatchGrantPermissionsResponse (Prelude.Maybe [BatchPermissionsFailureEntry])
batchGrantPermissionsResponse_failures :: (Maybe [BatchPermissionsFailureEntry]
 -> f (Maybe [BatchPermissionsFailureEntry]))
-> BatchGrantPermissionsResponse -> f BatchGrantPermissionsResponse
batchGrantPermissionsResponse_failures = (BatchGrantPermissionsResponse
 -> Maybe [BatchPermissionsFailureEntry])
-> (BatchGrantPermissionsResponse
    -> Maybe [BatchPermissionsFailureEntry]
    -> BatchGrantPermissionsResponse)
-> Lens
     BatchGrantPermissionsResponse
     BatchGrantPermissionsResponse
     (Maybe [BatchPermissionsFailureEntry])
     (Maybe [BatchPermissionsFailureEntry])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGrantPermissionsResponse' {Maybe [BatchPermissionsFailureEntry]
failures :: Maybe [BatchPermissionsFailureEntry]
$sel:failures:BatchGrantPermissionsResponse' :: BatchGrantPermissionsResponse
-> Maybe [BatchPermissionsFailureEntry]
failures} -> Maybe [BatchPermissionsFailureEntry]
failures) (\s :: BatchGrantPermissionsResponse
s@BatchGrantPermissionsResponse' {} Maybe [BatchPermissionsFailureEntry]
a -> BatchGrantPermissionsResponse
s {$sel:failures:BatchGrantPermissionsResponse' :: Maybe [BatchPermissionsFailureEntry]
failures = Maybe [BatchPermissionsFailureEntry]
a} :: BatchGrantPermissionsResponse) ((Maybe [BatchPermissionsFailureEntry]
  -> f (Maybe [BatchPermissionsFailureEntry]))
 -> BatchGrantPermissionsResponse
 -> f BatchGrantPermissionsResponse)
-> ((Maybe [BatchPermissionsFailureEntry]
     -> f (Maybe [BatchPermissionsFailureEntry]))
    -> Maybe [BatchPermissionsFailureEntry]
    -> f (Maybe [BatchPermissionsFailureEntry]))
-> (Maybe [BatchPermissionsFailureEntry]
    -> f (Maybe [BatchPermissionsFailureEntry]))
-> BatchGrantPermissionsResponse
-> f BatchGrantPermissionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [BatchPermissionsFailureEntry]
  [BatchPermissionsFailureEntry]
  [BatchPermissionsFailureEntry]
  [BatchPermissionsFailureEntry]
-> Iso
     (Maybe [BatchPermissionsFailureEntry])
     (Maybe [BatchPermissionsFailureEntry])
     (Maybe [BatchPermissionsFailureEntry])
     (Maybe [BatchPermissionsFailureEntry])
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
  [BatchPermissionsFailureEntry]
  [BatchPermissionsFailureEntry]
  [BatchPermissionsFailureEntry]
  [BatchPermissionsFailureEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData BatchGrantPermissionsResponse