{-# 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.IdentityStore.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)
--
-- Lists the attribute name and value of the user that you specified in the
-- search. We only support @UserName@ as a valid filter attribute path
-- currently, and filter is required. This API returns minimum attributes,
-- including @UserId@ and @UserName@ in the response.
module Amazonka.IdentityStore.ListUsers
  ( -- * Creating a Request
    ListUsers (..),
    newListUsers,

    -- * Request Lenses
    listUsers_filters,
    listUsers_nextToken,
    listUsers_maxResults,
    listUsers_identityStoreId,

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

    -- * Response Lenses
    listUsersResponse_nextToken,
    listUsersResponse_httpStatus,
    listUsersResponse_users,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IdentityStore.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:/ 'newListUsers' smart constructor.
data ListUsers = ListUsers'
  { -- | A list of @Filter@ objects, which is used in the @ListUsers@ and
    -- @ListGroups@ request.
    ListUsers -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The pagination token used for the @ListUsers@ and @ListGroups@ API
    -- operations. This value is generated by the identity store service. It is
    -- returned in the API response if the total results are more than the size
    -- of one page. This token is also returned when it is used in the API
    -- request to search for the next page.
    ListUsers -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to be returned per request. This parameter
    -- is used in the @ListUsers@ and @ListGroups@ request to specify how many
    -- results to return in one page. The length limit is 50 characters.
    ListUsers -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The globally unique identifier for the identity store, such as
    -- @d-1234567890@. In this example, @d-@ is a fixed prefix, and
    -- @1234567890@ is a randomly generated string that contains number and
    -- lower case letters. This value is generated at the time that a new
    -- identity store is created.
    ListUsers -> Text
identityStoreId :: 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, 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:
--
-- 'filters', 'listUsers_filters' - A list of @Filter@ objects, which is used in the @ListUsers@ and
-- @ListGroups@ request.
--
-- 'nextToken', 'listUsers_nextToken' - The pagination token used for the @ListUsers@ and @ListGroups@ API
-- operations. This value is generated by the identity store service. It is
-- returned in the API response if the total results are more than the size
-- of one page. This token is also returned when it is used in the API
-- request to search for the next page.
--
-- 'maxResults', 'listUsers_maxResults' - The maximum number of results to be returned per request. This parameter
-- is used in the @ListUsers@ and @ListGroups@ request to specify how many
-- results to return in one page. The length limit is 50 characters.
--
-- 'identityStoreId', 'listUsers_identityStoreId' - The globally unique identifier for the identity store, such as
-- @d-1234567890@. In this example, @d-@ is a fixed prefix, and
-- @1234567890@ is a randomly generated string that contains number and
-- lower case letters. This value is generated at the time that a new
-- identity store is created.
newListUsers ::
  -- | 'identityStoreId'
  Prelude.Text ->
  ListUsers
newListUsers :: Text -> ListUsers
newListUsers Text
pIdentityStoreId_ =
  ListUsers' :: Maybe [Filter] -> Maybe Text -> Maybe Natural -> Text -> ListUsers
ListUsers'
    { $sel:filters:ListUsers' :: Maybe [Filter]
filters = Maybe [Filter]
forall a. Maybe a
Prelude.Nothing,
      $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:identityStoreId:ListUsers' :: Text
identityStoreId = Text
pIdentityStoreId_
    }

-- | A list of @Filter@ objects, which is used in the @ListUsers@ and
-- @ListGroups@ request.
listUsers_filters :: Lens.Lens' ListUsers (Prelude.Maybe [Filter])
listUsers_filters :: (Maybe [Filter] -> f (Maybe [Filter])) -> ListUsers -> f ListUsers
listUsers_filters = (ListUsers -> Maybe [Filter])
-> (ListUsers -> Maybe [Filter] -> ListUsers)
-> Lens ListUsers ListUsers (Maybe [Filter]) (Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUsers' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:ListUsers' :: ListUsers -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: ListUsers
s@ListUsers' {} Maybe [Filter]
a -> ListUsers
s {$sel:filters:ListUsers' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: ListUsers) ((Maybe [Filter] -> f (Maybe [Filter]))
 -> ListUsers -> f ListUsers)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
    -> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> ListUsers
-> f ListUsers
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Filter] [Filter] [Filter] [Filter]
-> Iso
     (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter])
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 [Filter] [Filter] [Filter] [Filter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The pagination token used for the @ListUsers@ and @ListGroups@ API
-- operations. This value is generated by the identity store service. It is
-- returned in the API response if the total results are more than the size
-- of one page. This token is also returned when it is used in the API
-- request to search for the next page.
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 be returned per request. This parameter
-- is used in the @ListUsers@ and @ListGroups@ request to specify how many
-- results to return in one page. The length limit is 50 characters.
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 globally unique identifier for the identity store, such as
-- @d-1234567890@. In this example, @d-@ is a fixed prefix, and
-- @1234567890@ is a randomly generated string that contains number and
-- lower case letters. This value is generated at the time that a new
-- identity store is created.
listUsers_identityStoreId :: Lens.Lens' ListUsers Prelude.Text
listUsers_identityStoreId :: (Text -> f Text) -> ListUsers -> f ListUsers
listUsers_identityStoreId = (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
identityStoreId :: Text
$sel:identityStoreId:ListUsers' :: ListUsers -> Text
identityStoreId} -> Text
identityStoreId) (\s :: ListUsers
s@ListUsers' {} Text
a -> ListUsers
s {$sel:identityStoreId:ListUsers' :: Text
identityStoreId = 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, ToJSON a) => Service -> a -> Request a
Request.postJSON 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 -> Int -> [User] -> ListUsersResponse
ListUsersResponse'
            (Maybe Text -> Int -> [User] -> ListUsersResponse)
-> Either String (Maybe Text)
-> Either String (Int -> [User] -> 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
"NextToken")
            Either String (Int -> [User] -> ListUsersResponse)
-> Either String Int -> Either String ([User] -> 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))
            Either String ([User] -> ListUsersResponse)
-> Either String [User] -> Either String ListUsersResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe [User])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Users" Either String (Maybe [User]) -> [User] -> Either String [User]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [User]
forall a. Monoid a => a
Prelude.mempty)
      )

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
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"AWSIdentityStore.ListUsers" :: 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 ListUsers where
  toJSON :: ListUsers -> Value
toJSON ListUsers' {Maybe Natural
Maybe [Filter]
Maybe Text
Text
identityStoreId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
filters :: Maybe [Filter]
$sel:identityStoreId:ListUsers' :: ListUsers -> Text
$sel:maxResults:ListUsers' :: ListUsers -> Maybe Natural
$sel:nextToken:ListUsers' :: ListUsers -> Maybe Text
$sel:filters:ListUsers' :: ListUsers -> Maybe [Filter]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Filters" Text -> [Filter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Filter] -> Pair) -> Maybe [Filter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters,
            (Text
"NextToken" 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
nextToken,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"IdentityStoreId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
identityStoreId)
          ]
      )

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

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

-- | /See:/ 'newListUsersResponse' smart constructor.
data ListUsersResponse = ListUsersResponse'
  { -- | The pagination token used for the @ListUsers@ and @ListGroups@ API
    -- operations. This value is generated by the identity store service. It is
    -- returned in the API response if the total results are more than the size
    -- of one page. This token is also returned when it is used in the API
    -- request to search for the next page.
    ListUsersResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListUsersResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of @User@ objects in the identity store.
    ListUsersResponse -> [User]
users :: [User]
  }
  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, 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:
--
-- 'nextToken', 'listUsersResponse_nextToken' - The pagination token used for the @ListUsers@ and @ListGroups@ API
-- operations. This value is generated by the identity store service. It is
-- returned in the API response if the total results are more than the size
-- of one page. This token is also returned when it is used in the API
-- request to search for the next page.
--
-- 'httpStatus', 'listUsersResponse_httpStatus' - The response's http status code.
--
-- 'users', 'listUsersResponse_users' - A list of @User@ objects in the identity store.
newListUsersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListUsersResponse
newListUsersResponse :: Int -> ListUsersResponse
newListUsersResponse Int
pHttpStatus_ =
  ListUsersResponse' :: Maybe Text -> Int -> [User] -> ListUsersResponse
ListUsersResponse'
    { $sel:nextToken:ListUsersResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListUsersResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:users:ListUsersResponse' :: [User]
users = [User]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The pagination token used for the @ListUsers@ and @ListGroups@ API
-- operations. This value is generated by the identity store service. It is
-- returned in the API response if the total results are more than the size
-- of one page. This token is also returned when it is used in the API
-- request to search for the next page.
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 response's http status code.
listUsersResponse_httpStatus :: Lens.Lens' ListUsersResponse Prelude.Int
listUsersResponse_httpStatus :: (Int -> f Int) -> ListUsersResponse -> f ListUsersResponse
listUsersResponse_httpStatus = (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
httpStatus :: Int
$sel:httpStatus:ListUsersResponse' :: ListUsersResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListUsersResponse
s@ListUsersResponse' {} Int
a -> ListUsersResponse
s {$sel:httpStatus:ListUsersResponse' :: Int
httpStatus = Int
a} :: ListUsersResponse)

-- | A list of @User@ objects in the identity store.
listUsersResponse_users :: Lens.Lens' ListUsersResponse [User]
listUsersResponse_users :: ([User] -> f [User]) -> ListUsersResponse -> f ListUsersResponse
listUsersResponse_users = (ListUsersResponse -> [User])
-> (ListUsersResponse -> [User] -> ListUsersResponse)
-> Lens ListUsersResponse ListUsersResponse [User] [User]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUsersResponse' {[User]
users :: [User]
$sel:users:ListUsersResponse' :: ListUsersResponse -> [User]
users} -> [User]
users) (\s :: ListUsersResponse
s@ListUsersResponse' {} [User]
a -> ListUsersResponse
s {$sel:users:ListUsersResponse' :: [User]
users = [User]
a} :: ListUsersResponse) (([User] -> f [User]) -> ListUsersResponse -> f ListUsersResponse)
-> (([User] -> f [User]) -> [User] -> f [User])
-> ([User] -> f [User])
-> ListUsersResponse
-> f ListUsersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([User] -> f [User]) -> [User] -> f [User]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListUsersResponse