{-# 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.QuickSight.ListUsers
-- 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 all of the Amazon QuickSight users belonging to this
-- account.
module Amazonka.QuickSight.ListUsers
  ( -- * Creating a Request
    ListUsers (..),
    newListUsers,

    -- * Request Lenses
    listUsers_nextToken,
    listUsers_maxResults,
    listUsers_awsAccountId,
    listUsers_namespace,

    -- * Destructuring the Response
    ListUsersResponse (..),
    newListUsersResponse,

    -- * Response Lenses
    listUsersResponse_requestId,
    listUsersResponse_userList,
    listUsersResponse_nextToken,
    listUsersResponse_status,
  )
where

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

-- | /See:/ 'newListUsers' smart constructor.
data ListUsers = ListUsers'
  { -- | A pagination token that can be used in a subsequent request.
    ListUsers -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return from this request.
    ListUsers -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The ID for the Amazon Web Services account that the user is in.
    -- Currently, you use the ID for the Amazon Web Services account that
    -- contains your Amazon QuickSight account.
    ListUsers -> Text
awsAccountId :: Prelude.Text,
    -- | The namespace. Currently, you should set this to @default@.
    ListUsers -> Text
namespace :: Prelude.Text
  }
  deriving (ListUsers -> ListUsers -> Bool
(ListUsers -> ListUsers -> Bool)
-> (ListUsers -> ListUsers -> Bool) -> Eq ListUsers
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListUsers -> ListUsers -> Bool
$c/= :: ListUsers -> ListUsers -> Bool
== :: ListUsers -> ListUsers -> Bool
$c== :: ListUsers -> ListUsers -> Bool
Prelude.Eq, ReadPrec [ListUsers]
ReadPrec ListUsers
Int -> ReadS ListUsers
ReadS [ListUsers]
(Int -> ReadS ListUsers)
-> ReadS [ListUsers]
-> ReadPrec ListUsers
-> ReadPrec [ListUsers]
-> Read ListUsers
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListUsers]
$creadListPrec :: ReadPrec [ListUsers]
readPrec :: ReadPrec ListUsers
$creadPrec :: ReadPrec ListUsers
readList :: ReadS [ListUsers]
$creadList :: ReadS [ListUsers]
readsPrec :: Int -> ReadS ListUsers
$creadsPrec :: Int -> ReadS ListUsers
Prelude.Read, Int -> ListUsers -> ShowS
[ListUsers] -> ShowS
ListUsers -> String
(Int -> ListUsers -> ShowS)
-> (ListUsers -> String)
-> ([ListUsers] -> ShowS)
-> Show ListUsers
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListUsers] -> ShowS
$cshowList :: [ListUsers] -> ShowS
show :: ListUsers -> String
$cshow :: ListUsers -> String
showsPrec :: Int -> ListUsers -> ShowS
$cshowsPrec :: Int -> ListUsers -> ShowS
Prelude.Show, (forall x. ListUsers -> Rep ListUsers x)
-> (forall x. Rep ListUsers x -> ListUsers) -> Generic ListUsers
forall x. Rep ListUsers x -> ListUsers
forall x. ListUsers -> Rep ListUsers x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListUsers x -> ListUsers
$cfrom :: forall x. ListUsers -> Rep ListUsers x
Prelude.Generic)

-- |
-- Create a value of 'ListUsers' 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', 'listUsers_nextToken' - A pagination token that can be used in a subsequent request.
--
-- 'maxResults', 'listUsers_maxResults' - The maximum number of results to return from this request.
--
-- 'awsAccountId', 'listUsers_awsAccountId' - The ID for the Amazon Web Services account that the user is in.
-- Currently, you use the ID for the Amazon Web Services account that
-- contains your Amazon QuickSight account.
--
-- 'namespace', 'listUsers_namespace' - The namespace. Currently, you should set this to @default@.
newListUsers ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'namespace'
  Prelude.Text ->
  ListUsers
newListUsers :: Text -> Text -> ListUsers
newListUsers Text
pAwsAccountId_ Text
pNamespace_ =
  ListUsers' :: Maybe Text -> Maybe Natural -> Text -> Text -> ListUsers
ListUsers'
    { $sel:nextToken:ListUsers' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListUsers' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:awsAccountId:ListUsers' :: Text
awsAccountId = Text
pAwsAccountId_,
      $sel:namespace:ListUsers' :: Text
namespace = Text
pNamespace_
    }

-- | A pagination token that can be used in a subsequent request.
listUsers_nextToken :: Lens.Lens' ListUsers (Prelude.Maybe Prelude.Text)
listUsers_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListUsers -> f ListUsers
listUsers_nextToken = (ListUsers -> Maybe Text)
-> (ListUsers -> Maybe Text -> ListUsers)
-> Lens ListUsers ListUsers (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUsers' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListUsers' :: ListUsers -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListUsers
s@ListUsers' {} Maybe Text
a -> ListUsers
s {$sel:nextToken:ListUsers' :: Maybe Text
nextToken = Maybe Text
a} :: ListUsers)

-- | The maximum number of results to return from this request.
listUsers_maxResults :: Lens.Lens' ListUsers (Prelude.Maybe Prelude.Natural)
listUsers_maxResults :: (Maybe Natural -> f (Maybe Natural)) -> ListUsers -> f ListUsers
listUsers_maxResults = (ListUsers -> Maybe Natural)
-> (ListUsers -> Maybe Natural -> ListUsers)
-> Lens ListUsers ListUsers (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUsers' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListUsers' :: ListUsers -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListUsers
s@ListUsers' {} Maybe Natural
a -> ListUsers
s {$sel:maxResults:ListUsers' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListUsers)

-- | The ID for the Amazon Web Services account that the user is in.
-- Currently, you use the ID for the Amazon Web Services account that
-- contains your Amazon QuickSight account.
listUsers_awsAccountId :: Lens.Lens' ListUsers Prelude.Text
listUsers_awsAccountId :: (Text -> f Text) -> ListUsers -> f ListUsers
listUsers_awsAccountId = (ListUsers -> Text)
-> (ListUsers -> Text -> ListUsers)
-> Lens ListUsers ListUsers Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUsers' {Text
awsAccountId :: Text
$sel:awsAccountId:ListUsers' :: ListUsers -> Text
awsAccountId} -> Text
awsAccountId) (\s :: ListUsers
s@ListUsers' {} Text
a -> ListUsers
s {$sel:awsAccountId:ListUsers' :: Text
awsAccountId = Text
a} :: ListUsers)

-- | The namespace. Currently, you should set this to @default@.
listUsers_namespace :: Lens.Lens' ListUsers Prelude.Text
listUsers_namespace :: (Text -> f Text) -> ListUsers -> f ListUsers
listUsers_namespace = (ListUsers -> Text)
-> (ListUsers -> Text -> ListUsers)
-> Lens ListUsers ListUsers Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUsers' {Text
namespace :: Text
$sel:namespace:ListUsers' :: ListUsers -> Text
namespace} -> Text
namespace) (\s :: ListUsers
s@ListUsers' {} Text
a -> ListUsers
s {$sel:namespace:ListUsers' :: Text
namespace = Text
a} :: ListUsers)

instance Core.AWSRequest ListUsers where
  type AWSResponse ListUsers = ListUsersResponse
  request :: ListUsers -> Request ListUsers
request = Service -> ListUsers -> Request ListUsers
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListUsers
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListUsers)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListUsers))
-> Logger
-> Service
-> Proxy ListUsers
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListUsers)))
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 [User] -> Maybe Text -> Int -> ListUsersResponse
ListUsersResponse'
            (Maybe Text
 -> Maybe [User] -> Maybe Text -> Int -> ListUsersResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [User] -> Maybe Text -> Int -> ListUsersResponse)
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
"RequestId")
            Either
  String (Maybe [User] -> Maybe Text -> Int -> ListUsersResponse)
-> Either String (Maybe [User])
-> Either String (Maybe Text -> Int -> ListUsersResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [User]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"UserList" Either String (Maybe (Maybe [User]))
-> Maybe [User] -> Either String (Maybe [User])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [User]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe Text -> Int -> ListUsersResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListUsersResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either String (Int -> ListUsersResponse)
-> Either String Int -> Either String ListUsersResponse
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 ListUsers

instance Prelude.NFData ListUsers

instance Core.ToHeaders ListUsers where
  toHeaders :: ListUsers -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListUsers -> 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.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToPath ListUsers where
  toPath :: ListUsers -> ByteString
toPath ListUsers' {Maybe Natural
Maybe Text
Text
namespace :: Text
awsAccountId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:namespace:ListUsers' :: ListUsers -> Text
$sel:awsAccountId:ListUsers' :: ListUsers -> Text
$sel:maxResults:ListUsers' :: ListUsers -> Maybe Natural
$sel:nextToken:ListUsers' :: ListUsers -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/accounts/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
awsAccountId,
        ByteString
"/namespaces/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
namespace,
        ByteString
"/users"
      ]

instance Core.ToQuery ListUsers where
  toQuery :: ListUsers -> QueryString
toQuery ListUsers' {Maybe Natural
Maybe Text
Text
namespace :: Text
awsAccountId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:namespace:ListUsers' :: ListUsers -> Text
$sel:awsAccountId:ListUsers' :: ListUsers -> Text
$sel:maxResults:ListUsers' :: ListUsers -> Maybe Natural
$sel:nextToken:ListUsers' :: ListUsers -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"next-token" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"max-results" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListUsersResponse' smart constructor.
data ListUsersResponse = ListUsersResponse'
  { -- | The Amazon Web Services request ID for this operation.
    ListUsersResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The list of users.
    ListUsersResponse -> Maybe [User]
userList :: Prelude.Maybe [User],
    -- | A pagination token that can be used in a subsequent request.
    ListUsersResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The HTTP status of the request.
    ListUsersResponse -> Int
status :: Prelude.Int
  }
  deriving (ListUsersResponse -> ListUsersResponse -> Bool
(ListUsersResponse -> ListUsersResponse -> Bool)
-> (ListUsersResponse -> ListUsersResponse -> Bool)
-> Eq ListUsersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListUsersResponse -> ListUsersResponse -> Bool
$c/= :: ListUsersResponse -> ListUsersResponse -> Bool
== :: ListUsersResponse -> ListUsersResponse -> Bool
$c== :: ListUsersResponse -> ListUsersResponse -> Bool
Prelude.Eq, ReadPrec [ListUsersResponse]
ReadPrec ListUsersResponse
Int -> ReadS ListUsersResponse
ReadS [ListUsersResponse]
(Int -> ReadS ListUsersResponse)
-> ReadS [ListUsersResponse]
-> ReadPrec ListUsersResponse
-> ReadPrec [ListUsersResponse]
-> Read ListUsersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListUsersResponse]
$creadListPrec :: ReadPrec [ListUsersResponse]
readPrec :: ReadPrec ListUsersResponse
$creadPrec :: ReadPrec ListUsersResponse
readList :: ReadS [ListUsersResponse]
$creadList :: ReadS [ListUsersResponse]
readsPrec :: Int -> ReadS ListUsersResponse
$creadsPrec :: Int -> ReadS ListUsersResponse
Prelude.Read, Int -> ListUsersResponse -> ShowS
[ListUsersResponse] -> ShowS
ListUsersResponse -> String
(Int -> ListUsersResponse -> ShowS)
-> (ListUsersResponse -> String)
-> ([ListUsersResponse] -> ShowS)
-> Show ListUsersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListUsersResponse] -> ShowS
$cshowList :: [ListUsersResponse] -> ShowS
show :: ListUsersResponse -> String
$cshow :: ListUsersResponse -> String
showsPrec :: Int -> ListUsersResponse -> ShowS
$cshowsPrec :: Int -> ListUsersResponse -> ShowS
Prelude.Show, (forall x. ListUsersResponse -> Rep ListUsersResponse x)
-> (forall x. Rep ListUsersResponse x -> ListUsersResponse)
-> Generic ListUsersResponse
forall x. Rep ListUsersResponse x -> ListUsersResponse
forall x. ListUsersResponse -> Rep ListUsersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListUsersResponse x -> ListUsersResponse
$cfrom :: forall x. ListUsersResponse -> Rep ListUsersResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListUsersResponse' 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:
--
-- 'requestId', 'listUsersResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'userList', 'listUsersResponse_userList' - The list of users.
--
-- 'nextToken', 'listUsersResponse_nextToken' - A pagination token that can be used in a subsequent request.
--
-- 'status', 'listUsersResponse_status' - The HTTP status of the request.
newListUsersResponse ::
  -- | 'status'
  Prelude.Int ->
  ListUsersResponse
newListUsersResponse :: Int -> ListUsersResponse
newListUsersResponse Int
pStatus_ =
  ListUsersResponse' :: Maybe Text
-> Maybe [User] -> Maybe Text -> Int -> ListUsersResponse
ListUsersResponse'
    { $sel:requestId:ListUsersResponse' :: Maybe Text
requestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:userList:ListUsersResponse' :: Maybe [User]
userList = Maybe [User]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListUsersResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:ListUsersResponse' :: Int
status = Int
pStatus_
    }

-- | The Amazon Web Services request ID for this operation.
listUsersResponse_requestId :: Lens.Lens' ListUsersResponse (Prelude.Maybe Prelude.Text)
listUsersResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> ListUsersResponse -> f ListUsersResponse
listUsersResponse_requestId = (ListUsersResponse -> Maybe Text)
-> (ListUsersResponse -> Maybe Text -> ListUsersResponse)
-> Lens
     ListUsersResponse ListUsersResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUsersResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:ListUsersResponse' :: ListUsersResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: ListUsersResponse
s@ListUsersResponse' {} Maybe Text
a -> ListUsersResponse
s {$sel:requestId:ListUsersResponse' :: Maybe Text
requestId = Maybe Text
a} :: ListUsersResponse)

-- | The list of users.
listUsersResponse_userList :: Lens.Lens' ListUsersResponse (Prelude.Maybe [User])
listUsersResponse_userList :: (Maybe [User] -> f (Maybe [User]))
-> ListUsersResponse -> f ListUsersResponse
listUsersResponse_userList = (ListUsersResponse -> Maybe [User])
-> (ListUsersResponse -> Maybe [User] -> ListUsersResponse)
-> Lens
     ListUsersResponse ListUsersResponse (Maybe [User]) (Maybe [User])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUsersResponse' {Maybe [User]
userList :: Maybe [User]
$sel:userList:ListUsersResponse' :: ListUsersResponse -> Maybe [User]
userList} -> Maybe [User]
userList) (\s :: ListUsersResponse
s@ListUsersResponse' {} Maybe [User]
a -> ListUsersResponse
s {$sel:userList:ListUsersResponse' :: Maybe [User]
userList = Maybe [User]
a} :: ListUsersResponse) ((Maybe [User] -> f (Maybe [User]))
 -> ListUsersResponse -> f ListUsersResponse)
-> ((Maybe [User] -> f (Maybe [User]))
    -> Maybe [User] -> f (Maybe [User]))
-> (Maybe [User] -> f (Maybe [User]))
-> ListUsersResponse
-> f ListUsersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [User] [User] [User] [User]
-> Iso (Maybe [User]) (Maybe [User]) (Maybe [User]) (Maybe [User])
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 [User] [User] [User] [User]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A pagination token that can be used in a subsequent request.
listUsersResponse_nextToken :: Lens.Lens' ListUsersResponse (Prelude.Maybe Prelude.Text)
listUsersResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListUsersResponse -> f ListUsersResponse
listUsersResponse_nextToken = (ListUsersResponse -> Maybe Text)
-> (ListUsersResponse -> Maybe Text -> ListUsersResponse)
-> Lens
     ListUsersResponse ListUsersResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUsersResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListUsersResponse' :: ListUsersResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListUsersResponse
s@ListUsersResponse' {} Maybe Text
a -> ListUsersResponse
s {$sel:nextToken:ListUsersResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListUsersResponse)

-- | The HTTP status of the request.
listUsersResponse_status :: Lens.Lens' ListUsersResponse Prelude.Int
listUsersResponse_status :: (Int -> f Int) -> ListUsersResponse -> f ListUsersResponse
listUsersResponse_status = (ListUsersResponse -> Int)
-> (ListUsersResponse -> Int -> ListUsersResponse)
-> Lens ListUsersResponse ListUsersResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUsersResponse' {Int
status :: Int
$sel:status:ListUsersResponse' :: ListUsersResponse -> Int
status} -> Int
status) (\s :: ListUsersResponse
s@ListUsersResponse' {} Int
a -> ListUsersResponse
s {$sel:status:ListUsersResponse' :: Int
status = Int
a} :: ListUsersResponse)

instance Prelude.NFData ListUsersResponse