{-# 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.Kafka.BatchDisassociateScramSecret
-- 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)
--
-- Disassociates one or more Scram Secrets from an Amazon MSK cluster.
module Amazonka.Kafka.BatchDisassociateScramSecret
  ( -- * Creating a Request
    BatchDisassociateScramSecret (..),
    newBatchDisassociateScramSecret,

    -- * Request Lenses
    batchDisassociateScramSecret_clusterArn,
    batchDisassociateScramSecret_secretArnList,

    -- * Destructuring the Response
    BatchDisassociateScramSecretResponse (..),
    newBatchDisassociateScramSecretResponse,

    -- * Response Lenses
    batchDisassociateScramSecretResponse_clusterArn,
    batchDisassociateScramSecretResponse_unprocessedScramSecrets,
    batchDisassociateScramSecretResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Kafka.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

-- | Disassociates sasl scram secrets to cluster.
--
-- /See:/ 'newBatchDisassociateScramSecret' smart constructor.
data BatchDisassociateScramSecret = BatchDisassociateScramSecret'
  { -- | The Amazon Resource Name (ARN) of the cluster to be updated.
    BatchDisassociateScramSecret -> Text
clusterArn :: Prelude.Text,
    -- | List of AWS Secrets Manager secret ARNs.
    BatchDisassociateScramSecret -> [Text]
secretArnList :: [Prelude.Text]
  }
  deriving (BatchDisassociateScramSecret
-> BatchDisassociateScramSecret -> Bool
(BatchDisassociateScramSecret
 -> BatchDisassociateScramSecret -> Bool)
-> (BatchDisassociateScramSecret
    -> BatchDisassociateScramSecret -> Bool)
-> Eq BatchDisassociateScramSecret
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDisassociateScramSecret
-> BatchDisassociateScramSecret -> Bool
$c/= :: BatchDisassociateScramSecret
-> BatchDisassociateScramSecret -> Bool
== :: BatchDisassociateScramSecret
-> BatchDisassociateScramSecret -> Bool
$c== :: BatchDisassociateScramSecret
-> BatchDisassociateScramSecret -> Bool
Prelude.Eq, ReadPrec [BatchDisassociateScramSecret]
ReadPrec BatchDisassociateScramSecret
Int -> ReadS BatchDisassociateScramSecret
ReadS [BatchDisassociateScramSecret]
(Int -> ReadS BatchDisassociateScramSecret)
-> ReadS [BatchDisassociateScramSecret]
-> ReadPrec BatchDisassociateScramSecret
-> ReadPrec [BatchDisassociateScramSecret]
-> Read BatchDisassociateScramSecret
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDisassociateScramSecret]
$creadListPrec :: ReadPrec [BatchDisassociateScramSecret]
readPrec :: ReadPrec BatchDisassociateScramSecret
$creadPrec :: ReadPrec BatchDisassociateScramSecret
readList :: ReadS [BatchDisassociateScramSecret]
$creadList :: ReadS [BatchDisassociateScramSecret]
readsPrec :: Int -> ReadS BatchDisassociateScramSecret
$creadsPrec :: Int -> ReadS BatchDisassociateScramSecret
Prelude.Read, Int -> BatchDisassociateScramSecret -> ShowS
[BatchDisassociateScramSecret] -> ShowS
BatchDisassociateScramSecret -> String
(Int -> BatchDisassociateScramSecret -> ShowS)
-> (BatchDisassociateScramSecret -> String)
-> ([BatchDisassociateScramSecret] -> ShowS)
-> Show BatchDisassociateScramSecret
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDisassociateScramSecret] -> ShowS
$cshowList :: [BatchDisassociateScramSecret] -> ShowS
show :: BatchDisassociateScramSecret -> String
$cshow :: BatchDisassociateScramSecret -> String
showsPrec :: Int -> BatchDisassociateScramSecret -> ShowS
$cshowsPrec :: Int -> BatchDisassociateScramSecret -> ShowS
Prelude.Show, (forall x.
 BatchDisassociateScramSecret -> Rep BatchDisassociateScramSecret x)
-> (forall x.
    Rep BatchDisassociateScramSecret x -> BatchDisassociateScramSecret)
-> Generic BatchDisassociateScramSecret
forall x.
Rep BatchDisassociateScramSecret x -> BatchDisassociateScramSecret
forall x.
BatchDisassociateScramSecret -> Rep BatchDisassociateScramSecret x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchDisassociateScramSecret x -> BatchDisassociateScramSecret
$cfrom :: forall x.
BatchDisassociateScramSecret -> Rep BatchDisassociateScramSecret x
Prelude.Generic)

-- |
-- Create a value of 'BatchDisassociateScramSecret' 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:
--
-- 'clusterArn', 'batchDisassociateScramSecret_clusterArn' - The Amazon Resource Name (ARN) of the cluster to be updated.
--
-- 'secretArnList', 'batchDisassociateScramSecret_secretArnList' - List of AWS Secrets Manager secret ARNs.
newBatchDisassociateScramSecret ::
  -- | 'clusterArn'
  Prelude.Text ->
  BatchDisassociateScramSecret
newBatchDisassociateScramSecret :: Text -> BatchDisassociateScramSecret
newBatchDisassociateScramSecret Text
pClusterArn_ =
  BatchDisassociateScramSecret' :: Text -> [Text] -> BatchDisassociateScramSecret
BatchDisassociateScramSecret'
    { $sel:clusterArn:BatchDisassociateScramSecret' :: Text
clusterArn =
        Text
pClusterArn_,
      $sel:secretArnList:BatchDisassociateScramSecret' :: [Text]
secretArnList = [Text]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The Amazon Resource Name (ARN) of the cluster to be updated.
batchDisassociateScramSecret_clusterArn :: Lens.Lens' BatchDisassociateScramSecret Prelude.Text
batchDisassociateScramSecret_clusterArn :: (Text -> f Text)
-> BatchDisassociateScramSecret -> f BatchDisassociateScramSecret
batchDisassociateScramSecret_clusterArn = (BatchDisassociateScramSecret -> Text)
-> (BatchDisassociateScramSecret
    -> Text -> BatchDisassociateScramSecret)
-> Lens
     BatchDisassociateScramSecret BatchDisassociateScramSecret Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDisassociateScramSecret' {Text
clusterArn :: Text
$sel:clusterArn:BatchDisassociateScramSecret' :: BatchDisassociateScramSecret -> Text
clusterArn} -> Text
clusterArn) (\s :: BatchDisassociateScramSecret
s@BatchDisassociateScramSecret' {} Text
a -> BatchDisassociateScramSecret
s {$sel:clusterArn:BatchDisassociateScramSecret' :: Text
clusterArn = Text
a} :: BatchDisassociateScramSecret)

-- | List of AWS Secrets Manager secret ARNs.
batchDisassociateScramSecret_secretArnList :: Lens.Lens' BatchDisassociateScramSecret [Prelude.Text]
batchDisassociateScramSecret_secretArnList :: ([Text] -> f [Text])
-> BatchDisassociateScramSecret -> f BatchDisassociateScramSecret
batchDisassociateScramSecret_secretArnList = (BatchDisassociateScramSecret -> [Text])
-> (BatchDisassociateScramSecret
    -> [Text] -> BatchDisassociateScramSecret)
-> Lens
     BatchDisassociateScramSecret
     BatchDisassociateScramSecret
     [Text]
     [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDisassociateScramSecret' {[Text]
secretArnList :: [Text]
$sel:secretArnList:BatchDisassociateScramSecret' :: BatchDisassociateScramSecret -> [Text]
secretArnList} -> [Text]
secretArnList) (\s :: BatchDisassociateScramSecret
s@BatchDisassociateScramSecret' {} [Text]
a -> BatchDisassociateScramSecret
s {$sel:secretArnList:BatchDisassociateScramSecret' :: [Text]
secretArnList = [Text]
a} :: BatchDisassociateScramSecret) (([Text] -> f [Text])
 -> BatchDisassociateScramSecret -> f BatchDisassociateScramSecret)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> BatchDisassociateScramSecret
-> f BatchDisassociateScramSecret
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 BatchDisassociateScramSecret where
  type
    AWSResponse BatchDisassociateScramSecret =
      BatchDisassociateScramSecretResponse
  request :: BatchDisassociateScramSecret
-> Request BatchDisassociateScramSecret
request = Service
-> BatchDisassociateScramSecret
-> Request BatchDisassociateScramSecret
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy BatchDisassociateScramSecret
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse BatchDisassociateScramSecret)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse BatchDisassociateScramSecret))
-> Logger
-> Service
-> Proxy BatchDisassociateScramSecret
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse BatchDisassociateScramSecret)))
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 [UnprocessedScramSecret]
-> Int
-> BatchDisassociateScramSecretResponse
BatchDisassociateScramSecretResponse'
            (Maybe Text
 -> Maybe [UnprocessedScramSecret]
 -> Int
 -> BatchDisassociateScramSecretResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [UnprocessedScramSecret]
      -> Int -> BatchDisassociateScramSecretResponse)
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
"clusterArn")
            Either
  String
  (Maybe [UnprocessedScramSecret]
   -> Int -> BatchDisassociateScramSecretResponse)
-> Either String (Maybe [UnprocessedScramSecret])
-> Either String (Int -> BatchDisassociateScramSecretResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [UnprocessedScramSecret]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"unprocessedScramSecrets"
                            Either String (Maybe (Maybe [UnprocessedScramSecret]))
-> Maybe [UnprocessedScramSecret]
-> Either String (Maybe [UnprocessedScramSecret])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [UnprocessedScramSecret]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> BatchDisassociateScramSecretResponse)
-> Either String Int
-> Either String BatchDisassociateScramSecretResponse
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
    BatchDisassociateScramSecret

instance Prelude.NFData BatchDisassociateScramSecret

instance Core.ToHeaders BatchDisassociateScramSecret where
  toHeaders :: BatchDisassociateScramSecret -> ResponseHeaders
toHeaders =
    ResponseHeaders -> BatchDisassociateScramSecret -> 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 BatchDisassociateScramSecret where
  toJSON :: BatchDisassociateScramSecret -> Value
toJSON BatchDisassociateScramSecret' {[Text]
Text
secretArnList :: [Text]
clusterArn :: Text
$sel:secretArnList:BatchDisassociateScramSecret' :: BatchDisassociateScramSecret -> [Text]
$sel:clusterArn:BatchDisassociateScramSecret' :: BatchDisassociateScramSecret -> 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
"secretArnList" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
secretArnList)
          ]
      )

instance Core.ToPath BatchDisassociateScramSecret where
  toPath :: BatchDisassociateScramSecret -> ByteString
toPath BatchDisassociateScramSecret' {[Text]
Text
secretArnList :: [Text]
clusterArn :: Text
$sel:secretArnList:BatchDisassociateScramSecret' :: BatchDisassociateScramSecret -> [Text]
$sel:clusterArn:BatchDisassociateScramSecret' :: BatchDisassociateScramSecret -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v1/clusters/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
clusterArn,
        ByteString
"/scram-secrets"
      ]

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

-- | /See:/ 'newBatchDisassociateScramSecretResponse' smart constructor.
data BatchDisassociateScramSecretResponse = BatchDisassociateScramSecretResponse'
  { -- | The Amazon Resource Name (ARN) of the cluster.
    BatchDisassociateScramSecretResponse -> Maybe Text
clusterArn :: Prelude.Maybe Prelude.Text,
    -- | List of errors when disassociating secrets to cluster.
    BatchDisassociateScramSecretResponse
-> Maybe [UnprocessedScramSecret]
unprocessedScramSecrets :: Prelude.Maybe [UnprocessedScramSecret],
    -- | The response's http status code.
    BatchDisassociateScramSecretResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (BatchDisassociateScramSecretResponse
-> BatchDisassociateScramSecretResponse -> Bool
(BatchDisassociateScramSecretResponse
 -> BatchDisassociateScramSecretResponse -> Bool)
-> (BatchDisassociateScramSecretResponse
    -> BatchDisassociateScramSecretResponse -> Bool)
-> Eq BatchDisassociateScramSecretResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDisassociateScramSecretResponse
-> BatchDisassociateScramSecretResponse -> Bool
$c/= :: BatchDisassociateScramSecretResponse
-> BatchDisassociateScramSecretResponse -> Bool
== :: BatchDisassociateScramSecretResponse
-> BatchDisassociateScramSecretResponse -> Bool
$c== :: BatchDisassociateScramSecretResponse
-> BatchDisassociateScramSecretResponse -> Bool
Prelude.Eq, ReadPrec [BatchDisassociateScramSecretResponse]
ReadPrec BatchDisassociateScramSecretResponse
Int -> ReadS BatchDisassociateScramSecretResponse
ReadS [BatchDisassociateScramSecretResponse]
(Int -> ReadS BatchDisassociateScramSecretResponse)
-> ReadS [BatchDisassociateScramSecretResponse]
-> ReadPrec BatchDisassociateScramSecretResponse
-> ReadPrec [BatchDisassociateScramSecretResponse]
-> Read BatchDisassociateScramSecretResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDisassociateScramSecretResponse]
$creadListPrec :: ReadPrec [BatchDisassociateScramSecretResponse]
readPrec :: ReadPrec BatchDisassociateScramSecretResponse
$creadPrec :: ReadPrec BatchDisassociateScramSecretResponse
readList :: ReadS [BatchDisassociateScramSecretResponse]
$creadList :: ReadS [BatchDisassociateScramSecretResponse]
readsPrec :: Int -> ReadS BatchDisassociateScramSecretResponse
$creadsPrec :: Int -> ReadS BatchDisassociateScramSecretResponse
Prelude.Read, Int -> BatchDisassociateScramSecretResponse -> ShowS
[BatchDisassociateScramSecretResponse] -> ShowS
BatchDisassociateScramSecretResponse -> String
(Int -> BatchDisassociateScramSecretResponse -> ShowS)
-> (BatchDisassociateScramSecretResponse -> String)
-> ([BatchDisassociateScramSecretResponse] -> ShowS)
-> Show BatchDisassociateScramSecretResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDisassociateScramSecretResponse] -> ShowS
$cshowList :: [BatchDisassociateScramSecretResponse] -> ShowS
show :: BatchDisassociateScramSecretResponse -> String
$cshow :: BatchDisassociateScramSecretResponse -> String
showsPrec :: Int -> BatchDisassociateScramSecretResponse -> ShowS
$cshowsPrec :: Int -> BatchDisassociateScramSecretResponse -> ShowS
Prelude.Show, (forall x.
 BatchDisassociateScramSecretResponse
 -> Rep BatchDisassociateScramSecretResponse x)
-> (forall x.
    Rep BatchDisassociateScramSecretResponse x
    -> BatchDisassociateScramSecretResponse)
-> Generic BatchDisassociateScramSecretResponse
forall x.
Rep BatchDisassociateScramSecretResponse x
-> BatchDisassociateScramSecretResponse
forall x.
BatchDisassociateScramSecretResponse
-> Rep BatchDisassociateScramSecretResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchDisassociateScramSecretResponse x
-> BatchDisassociateScramSecretResponse
$cfrom :: forall x.
BatchDisassociateScramSecretResponse
-> Rep BatchDisassociateScramSecretResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchDisassociateScramSecretResponse' 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:
--
-- 'clusterArn', 'batchDisassociateScramSecretResponse_clusterArn' - The Amazon Resource Name (ARN) of the cluster.
--
-- 'unprocessedScramSecrets', 'batchDisassociateScramSecretResponse_unprocessedScramSecrets' - List of errors when disassociating secrets to cluster.
--
-- 'httpStatus', 'batchDisassociateScramSecretResponse_httpStatus' - The response's http status code.
newBatchDisassociateScramSecretResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BatchDisassociateScramSecretResponse
newBatchDisassociateScramSecretResponse :: Int -> BatchDisassociateScramSecretResponse
newBatchDisassociateScramSecretResponse Int
pHttpStatus_ =
  BatchDisassociateScramSecretResponse' :: Maybe Text
-> Maybe [UnprocessedScramSecret]
-> Int
-> BatchDisassociateScramSecretResponse
BatchDisassociateScramSecretResponse'
    { $sel:clusterArn:BatchDisassociateScramSecretResponse' :: Maybe Text
clusterArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:unprocessedScramSecrets:BatchDisassociateScramSecretResponse' :: Maybe [UnprocessedScramSecret]
unprocessedScramSecrets =
        Maybe [UnprocessedScramSecret]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:BatchDisassociateScramSecretResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the cluster.
batchDisassociateScramSecretResponse_clusterArn :: Lens.Lens' BatchDisassociateScramSecretResponse (Prelude.Maybe Prelude.Text)
batchDisassociateScramSecretResponse_clusterArn :: (Maybe Text -> f (Maybe Text))
-> BatchDisassociateScramSecretResponse
-> f BatchDisassociateScramSecretResponse
batchDisassociateScramSecretResponse_clusterArn = (BatchDisassociateScramSecretResponse -> Maybe Text)
-> (BatchDisassociateScramSecretResponse
    -> Maybe Text -> BatchDisassociateScramSecretResponse)
-> Lens
     BatchDisassociateScramSecretResponse
     BatchDisassociateScramSecretResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDisassociateScramSecretResponse' {Maybe Text
clusterArn :: Maybe Text
$sel:clusterArn:BatchDisassociateScramSecretResponse' :: BatchDisassociateScramSecretResponse -> Maybe Text
clusterArn} -> Maybe Text
clusterArn) (\s :: BatchDisassociateScramSecretResponse
s@BatchDisassociateScramSecretResponse' {} Maybe Text
a -> BatchDisassociateScramSecretResponse
s {$sel:clusterArn:BatchDisassociateScramSecretResponse' :: Maybe Text
clusterArn = Maybe Text
a} :: BatchDisassociateScramSecretResponse)

-- | List of errors when disassociating secrets to cluster.
batchDisassociateScramSecretResponse_unprocessedScramSecrets :: Lens.Lens' BatchDisassociateScramSecretResponse (Prelude.Maybe [UnprocessedScramSecret])
batchDisassociateScramSecretResponse_unprocessedScramSecrets :: (Maybe [UnprocessedScramSecret]
 -> f (Maybe [UnprocessedScramSecret]))
-> BatchDisassociateScramSecretResponse
-> f BatchDisassociateScramSecretResponse
batchDisassociateScramSecretResponse_unprocessedScramSecrets = (BatchDisassociateScramSecretResponse
 -> Maybe [UnprocessedScramSecret])
-> (BatchDisassociateScramSecretResponse
    -> Maybe [UnprocessedScramSecret]
    -> BatchDisassociateScramSecretResponse)
-> Lens
     BatchDisassociateScramSecretResponse
     BatchDisassociateScramSecretResponse
     (Maybe [UnprocessedScramSecret])
     (Maybe [UnprocessedScramSecret])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDisassociateScramSecretResponse' {Maybe [UnprocessedScramSecret]
unprocessedScramSecrets :: Maybe [UnprocessedScramSecret]
$sel:unprocessedScramSecrets:BatchDisassociateScramSecretResponse' :: BatchDisassociateScramSecretResponse
-> Maybe [UnprocessedScramSecret]
unprocessedScramSecrets} -> Maybe [UnprocessedScramSecret]
unprocessedScramSecrets) (\s :: BatchDisassociateScramSecretResponse
s@BatchDisassociateScramSecretResponse' {} Maybe [UnprocessedScramSecret]
a -> BatchDisassociateScramSecretResponse
s {$sel:unprocessedScramSecrets:BatchDisassociateScramSecretResponse' :: Maybe [UnprocessedScramSecret]
unprocessedScramSecrets = Maybe [UnprocessedScramSecret]
a} :: BatchDisassociateScramSecretResponse) ((Maybe [UnprocessedScramSecret]
  -> f (Maybe [UnprocessedScramSecret]))
 -> BatchDisassociateScramSecretResponse
 -> f BatchDisassociateScramSecretResponse)
-> ((Maybe [UnprocessedScramSecret]
     -> f (Maybe [UnprocessedScramSecret]))
    -> Maybe [UnprocessedScramSecret]
    -> f (Maybe [UnprocessedScramSecret]))
-> (Maybe [UnprocessedScramSecret]
    -> f (Maybe [UnprocessedScramSecret]))
-> BatchDisassociateScramSecretResponse
-> f BatchDisassociateScramSecretResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [UnprocessedScramSecret]
  [UnprocessedScramSecret]
  [UnprocessedScramSecret]
  [UnprocessedScramSecret]
-> Iso
     (Maybe [UnprocessedScramSecret])
     (Maybe [UnprocessedScramSecret])
     (Maybe [UnprocessedScramSecret])
     (Maybe [UnprocessedScramSecret])
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
  [UnprocessedScramSecret]
  [UnprocessedScramSecret]
  [UnprocessedScramSecret]
  [UnprocessedScramSecret]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    BatchDisassociateScramSecretResponse