{-# 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.ListScramSecrets
-- 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)
--
-- Returns a list of the Scram Secrets associated with an Amazon MSK
-- cluster.
--
-- This operation returns paginated results.
module Amazonka.Kafka.ListScramSecrets
  ( -- * Creating a Request
    ListScramSecrets (..),
    newListScramSecrets,

    -- * Request Lenses
    listScramSecrets_nextToken,
    listScramSecrets_maxResults,
    listScramSecrets_clusterArn,

    -- * Destructuring the Response
    ListScramSecretsResponse (..),
    newListScramSecretsResponse,

    -- * Response Lenses
    listScramSecretsResponse_nextToken,
    listScramSecretsResponse_secretArnList,
    listScramSecretsResponse_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

-- | /See:/ 'newListScramSecrets' smart constructor.
data ListScramSecrets = ListScramSecrets'
  { -- | The nextToken of the query.
    ListScramSecrets -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maxResults of the query.
    ListScramSecrets -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The arn of the cluster.
    ListScramSecrets -> Text
clusterArn :: Prelude.Text
  }
  deriving (ListScramSecrets -> ListScramSecrets -> Bool
(ListScramSecrets -> ListScramSecrets -> Bool)
-> (ListScramSecrets -> ListScramSecrets -> Bool)
-> Eq ListScramSecrets
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListScramSecrets -> ListScramSecrets -> Bool
$c/= :: ListScramSecrets -> ListScramSecrets -> Bool
== :: ListScramSecrets -> ListScramSecrets -> Bool
$c== :: ListScramSecrets -> ListScramSecrets -> Bool
Prelude.Eq, ReadPrec [ListScramSecrets]
ReadPrec ListScramSecrets
Int -> ReadS ListScramSecrets
ReadS [ListScramSecrets]
(Int -> ReadS ListScramSecrets)
-> ReadS [ListScramSecrets]
-> ReadPrec ListScramSecrets
-> ReadPrec [ListScramSecrets]
-> Read ListScramSecrets
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListScramSecrets]
$creadListPrec :: ReadPrec [ListScramSecrets]
readPrec :: ReadPrec ListScramSecrets
$creadPrec :: ReadPrec ListScramSecrets
readList :: ReadS [ListScramSecrets]
$creadList :: ReadS [ListScramSecrets]
readsPrec :: Int -> ReadS ListScramSecrets
$creadsPrec :: Int -> ReadS ListScramSecrets
Prelude.Read, Int -> ListScramSecrets -> ShowS
[ListScramSecrets] -> ShowS
ListScramSecrets -> String
(Int -> ListScramSecrets -> ShowS)
-> (ListScramSecrets -> String)
-> ([ListScramSecrets] -> ShowS)
-> Show ListScramSecrets
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListScramSecrets] -> ShowS
$cshowList :: [ListScramSecrets] -> ShowS
show :: ListScramSecrets -> String
$cshow :: ListScramSecrets -> String
showsPrec :: Int -> ListScramSecrets -> ShowS
$cshowsPrec :: Int -> ListScramSecrets -> ShowS
Prelude.Show, (forall x. ListScramSecrets -> Rep ListScramSecrets x)
-> (forall x. Rep ListScramSecrets x -> ListScramSecrets)
-> Generic ListScramSecrets
forall x. Rep ListScramSecrets x -> ListScramSecrets
forall x. ListScramSecrets -> Rep ListScramSecrets x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListScramSecrets x -> ListScramSecrets
$cfrom :: forall x. ListScramSecrets -> Rep ListScramSecrets x
Prelude.Generic)

-- |
-- Create a value of 'ListScramSecrets' 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:
--
-- 'nextToken', 'listScramSecrets_nextToken' - The nextToken of the query.
--
-- 'maxResults', 'listScramSecrets_maxResults' - The maxResults of the query.
--
-- 'clusterArn', 'listScramSecrets_clusterArn' - The arn of the cluster.
newListScramSecrets ::
  -- | 'clusterArn'
  Prelude.Text ->
  ListScramSecrets
newListScramSecrets :: Text -> ListScramSecrets
newListScramSecrets Text
pClusterArn_ =
  ListScramSecrets' :: Maybe Text -> Maybe Natural -> Text -> ListScramSecrets
ListScramSecrets'
    { $sel:nextToken:ListScramSecrets' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListScramSecrets' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterArn:ListScramSecrets' :: Text
clusterArn = Text
pClusterArn_
    }

-- | The nextToken of the query.
listScramSecrets_nextToken :: Lens.Lens' ListScramSecrets (Prelude.Maybe Prelude.Text)
listScramSecrets_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListScramSecrets -> f ListScramSecrets
listScramSecrets_nextToken = (ListScramSecrets -> Maybe Text)
-> (ListScramSecrets -> Maybe Text -> ListScramSecrets)
-> Lens ListScramSecrets ListScramSecrets (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListScramSecrets' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListScramSecrets' :: ListScramSecrets -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListScramSecrets
s@ListScramSecrets' {} Maybe Text
a -> ListScramSecrets
s {$sel:nextToken:ListScramSecrets' :: Maybe Text
nextToken = Maybe Text
a} :: ListScramSecrets)

-- | The maxResults of the query.
listScramSecrets_maxResults :: Lens.Lens' ListScramSecrets (Prelude.Maybe Prelude.Natural)
listScramSecrets_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListScramSecrets -> f ListScramSecrets
listScramSecrets_maxResults = (ListScramSecrets -> Maybe Natural)
-> (ListScramSecrets -> Maybe Natural -> ListScramSecrets)
-> Lens
     ListScramSecrets ListScramSecrets (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListScramSecrets' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListScramSecrets' :: ListScramSecrets -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListScramSecrets
s@ListScramSecrets' {} Maybe Natural
a -> ListScramSecrets
s {$sel:maxResults:ListScramSecrets' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListScramSecrets)

-- | The arn of the cluster.
listScramSecrets_clusterArn :: Lens.Lens' ListScramSecrets Prelude.Text
listScramSecrets_clusterArn :: (Text -> f Text) -> ListScramSecrets -> f ListScramSecrets
listScramSecrets_clusterArn = (ListScramSecrets -> Text)
-> (ListScramSecrets -> Text -> ListScramSecrets)
-> Lens ListScramSecrets ListScramSecrets Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListScramSecrets' {Text
clusterArn :: Text
$sel:clusterArn:ListScramSecrets' :: ListScramSecrets -> Text
clusterArn} -> Text
clusterArn) (\s :: ListScramSecrets
s@ListScramSecrets' {} Text
a -> ListScramSecrets
s {$sel:clusterArn:ListScramSecrets' :: Text
clusterArn = Text
a} :: ListScramSecrets)

instance Core.AWSPager ListScramSecrets where
  page :: ListScramSecrets
-> AWSResponse ListScramSecrets -> Maybe ListScramSecrets
page ListScramSecrets
rq AWSResponse ListScramSecrets
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListScramSecrets
ListScramSecretsResponse
rs
            ListScramSecretsResponse
-> Getting (First Text) ListScramSecretsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListScramSecretsResponse
-> Const (First Text) ListScramSecretsResponse
Lens' ListScramSecretsResponse (Maybe Text)
listScramSecretsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListScramSecretsResponse
 -> Const (First Text) ListScramSecretsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListScramSecretsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListScramSecrets
forall a. Maybe a
Prelude.Nothing
    | Maybe [Text] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListScramSecrets
ListScramSecretsResponse
rs
            ListScramSecretsResponse
-> Getting (First [Text]) ListScramSecretsResponse [Text]
-> Maybe [Text]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> ListScramSecretsResponse
-> Const (First [Text]) ListScramSecretsResponse
Lens' ListScramSecretsResponse (Maybe [Text])
listScramSecretsResponse_secretArnList
              ((Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
 -> ListScramSecretsResponse
 -> Const (First [Text]) ListScramSecretsResponse)
-> (([Text] -> Const (First [Text]) [Text])
    -> Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> Getting (First [Text]) ListScramSecretsResponse [Text]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> Const (First [Text]) [Text])
-> Maybe [Text] -> Const (First [Text]) (Maybe [Text])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListScramSecrets
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListScramSecrets -> Maybe ListScramSecrets
forall a. a -> Maybe a
Prelude.Just (ListScramSecrets -> Maybe ListScramSecrets)
-> ListScramSecrets -> Maybe ListScramSecrets
forall a b. (a -> b) -> a -> b
Prelude.$
        ListScramSecrets
rq
          ListScramSecrets
-> (ListScramSecrets -> ListScramSecrets) -> ListScramSecrets
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListScramSecrets -> Identity ListScramSecrets
Lens ListScramSecrets ListScramSecrets (Maybe Text) (Maybe Text)
listScramSecrets_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListScramSecrets -> Identity ListScramSecrets)
-> Maybe Text -> ListScramSecrets -> ListScramSecrets
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListScramSecrets
ListScramSecretsResponse
rs
          ListScramSecretsResponse
-> Getting (First Text) ListScramSecretsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListScramSecretsResponse
-> Const (First Text) ListScramSecretsResponse
Lens' ListScramSecretsResponse (Maybe Text)
listScramSecretsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListScramSecretsResponse
 -> Const (First Text) ListScramSecretsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListScramSecretsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListScramSecrets where
  type
    AWSResponse ListScramSecrets =
      ListScramSecretsResponse
  request :: ListScramSecrets -> Request ListScramSecrets
request = Service -> ListScramSecrets -> Request ListScramSecrets
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListScramSecrets
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListScramSecrets)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListScramSecrets))
-> Logger
-> Service
-> Proxy ListScramSecrets
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListScramSecrets)))
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] -> Int -> ListScramSecretsResponse
ListScramSecretsResponse'
            (Maybe Text -> Maybe [Text] -> Int -> ListScramSecretsResponse)
-> Either String (Maybe Text)
-> Either String (Maybe [Text] -> Int -> ListScramSecretsResponse)
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
"nextToken")
            Either String (Maybe [Text] -> Int -> ListScramSecretsResponse)
-> Either String (Maybe [Text])
-> Either String (Int -> ListScramSecretsResponse)
forall (f :: * -> *) a b. Applicative f => 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
"secretArnList" 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 (Int -> ListScramSecretsResponse)
-> Either String Int -> Either String ListScramSecretsResponse
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 ListScramSecrets

instance Prelude.NFData ListScramSecrets

instance Core.ToHeaders ListScramSecrets where
  toHeaders :: ListScramSecrets -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListScramSecrets -> 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.ToPath ListScramSecrets where
  toPath :: ListScramSecrets -> ByteString
toPath ListScramSecrets' {Maybe Natural
Maybe Text
Text
clusterArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:clusterArn:ListScramSecrets' :: ListScramSecrets -> Text
$sel:maxResults:ListScramSecrets' :: ListScramSecrets -> Maybe Natural
$sel:nextToken:ListScramSecrets' :: ListScramSecrets -> Maybe 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 ListScramSecrets where
  toQuery :: ListScramSecrets -> QueryString
toQuery ListScramSecrets' {Maybe Natural
Maybe Text
Text
clusterArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:clusterArn:ListScramSecrets' :: ListScramSecrets -> Text
$sel:maxResults:ListScramSecrets' :: ListScramSecrets -> Maybe Natural
$sel:nextToken:ListScramSecrets' :: ListScramSecrets -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListScramSecretsResponse' smart constructor.
data ListScramSecretsResponse = ListScramSecretsResponse'
  { -- | Paginated results marker.
    ListScramSecretsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The list of scram secrets associated with the cluster.
    ListScramSecretsResponse -> Maybe [Text]
secretArnList :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    ListScramSecretsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListScramSecretsResponse -> ListScramSecretsResponse -> Bool
(ListScramSecretsResponse -> ListScramSecretsResponse -> Bool)
-> (ListScramSecretsResponse -> ListScramSecretsResponse -> Bool)
-> Eq ListScramSecretsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListScramSecretsResponse -> ListScramSecretsResponse -> Bool
$c/= :: ListScramSecretsResponse -> ListScramSecretsResponse -> Bool
== :: ListScramSecretsResponse -> ListScramSecretsResponse -> Bool
$c== :: ListScramSecretsResponse -> ListScramSecretsResponse -> Bool
Prelude.Eq, ReadPrec [ListScramSecretsResponse]
ReadPrec ListScramSecretsResponse
Int -> ReadS ListScramSecretsResponse
ReadS [ListScramSecretsResponse]
(Int -> ReadS ListScramSecretsResponse)
-> ReadS [ListScramSecretsResponse]
-> ReadPrec ListScramSecretsResponse
-> ReadPrec [ListScramSecretsResponse]
-> Read ListScramSecretsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListScramSecretsResponse]
$creadListPrec :: ReadPrec [ListScramSecretsResponse]
readPrec :: ReadPrec ListScramSecretsResponse
$creadPrec :: ReadPrec ListScramSecretsResponse
readList :: ReadS [ListScramSecretsResponse]
$creadList :: ReadS [ListScramSecretsResponse]
readsPrec :: Int -> ReadS ListScramSecretsResponse
$creadsPrec :: Int -> ReadS ListScramSecretsResponse
Prelude.Read, Int -> ListScramSecretsResponse -> ShowS
[ListScramSecretsResponse] -> ShowS
ListScramSecretsResponse -> String
(Int -> ListScramSecretsResponse -> ShowS)
-> (ListScramSecretsResponse -> String)
-> ([ListScramSecretsResponse] -> ShowS)
-> Show ListScramSecretsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListScramSecretsResponse] -> ShowS
$cshowList :: [ListScramSecretsResponse] -> ShowS
show :: ListScramSecretsResponse -> String
$cshow :: ListScramSecretsResponse -> String
showsPrec :: Int -> ListScramSecretsResponse -> ShowS
$cshowsPrec :: Int -> ListScramSecretsResponse -> ShowS
Prelude.Show, (forall x.
 ListScramSecretsResponse -> Rep ListScramSecretsResponse x)
-> (forall x.
    Rep ListScramSecretsResponse x -> ListScramSecretsResponse)
-> Generic ListScramSecretsResponse
forall x.
Rep ListScramSecretsResponse x -> ListScramSecretsResponse
forall x.
ListScramSecretsResponse -> Rep ListScramSecretsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListScramSecretsResponse x -> ListScramSecretsResponse
$cfrom :: forall x.
ListScramSecretsResponse -> Rep ListScramSecretsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListScramSecretsResponse' 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:
--
-- 'nextToken', 'listScramSecretsResponse_nextToken' - Paginated results marker.
--
-- 'secretArnList', 'listScramSecretsResponse_secretArnList' - The list of scram secrets associated with the cluster.
--
-- 'httpStatus', 'listScramSecretsResponse_httpStatus' - The response's http status code.
newListScramSecretsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListScramSecretsResponse
newListScramSecretsResponse :: Int -> ListScramSecretsResponse
newListScramSecretsResponse Int
pHttpStatus_ =
  ListScramSecretsResponse' :: Maybe Text -> Maybe [Text] -> Int -> ListScramSecretsResponse
ListScramSecretsResponse'
    { $sel:nextToken:ListScramSecretsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:secretArnList:ListScramSecretsResponse' :: Maybe [Text]
secretArnList = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListScramSecretsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Paginated results marker.
listScramSecretsResponse_nextToken :: Lens.Lens' ListScramSecretsResponse (Prelude.Maybe Prelude.Text)
listScramSecretsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListScramSecretsResponse -> f ListScramSecretsResponse
listScramSecretsResponse_nextToken = (ListScramSecretsResponse -> Maybe Text)
-> (ListScramSecretsResponse
    -> Maybe Text -> ListScramSecretsResponse)
-> Lens' ListScramSecretsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListScramSecretsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListScramSecretsResponse' :: ListScramSecretsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListScramSecretsResponse
s@ListScramSecretsResponse' {} Maybe Text
a -> ListScramSecretsResponse
s {$sel:nextToken:ListScramSecretsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListScramSecretsResponse)

-- | The list of scram secrets associated with the cluster.
listScramSecretsResponse_secretArnList :: Lens.Lens' ListScramSecretsResponse (Prelude.Maybe [Prelude.Text])
listScramSecretsResponse_secretArnList :: (Maybe [Text] -> f (Maybe [Text]))
-> ListScramSecretsResponse -> f ListScramSecretsResponse
listScramSecretsResponse_secretArnList = (ListScramSecretsResponse -> Maybe [Text])
-> (ListScramSecretsResponse
    -> Maybe [Text] -> ListScramSecretsResponse)
-> Lens' ListScramSecretsResponse (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListScramSecretsResponse' {Maybe [Text]
secretArnList :: Maybe [Text]
$sel:secretArnList:ListScramSecretsResponse' :: ListScramSecretsResponse -> Maybe [Text]
secretArnList} -> Maybe [Text]
secretArnList) (\s :: ListScramSecretsResponse
s@ListScramSecretsResponse' {} Maybe [Text]
a -> ListScramSecretsResponse
s {$sel:secretArnList:ListScramSecretsResponse' :: Maybe [Text]
secretArnList = Maybe [Text]
a} :: ListScramSecretsResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> ListScramSecretsResponse -> f ListScramSecretsResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListScramSecretsResponse
-> f ListScramSecretsResponse
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

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

instance Prelude.NFData ListScramSecretsResponse