{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists all users in the identity store. Returns a paginated list of
-- complete @User@ objects. Filtering for a @User@ by the @UserName@
-- attribute is deprecated. Instead, use the @GetUserId@ API action.
--
-- This operation returns paginated results.
module Amazonka.IdentityStore.ListUsers
  ( -- * Creating a Request
    ListUsers (..),
    newListUsers,

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

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

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

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IdentityStore.Types
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@ requests.
    ListUsers -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The maximum number of results to be returned per request. This parameter
    -- is used in the @ListUsers@ and @ListGroups@ requests 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 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 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 numbers 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
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
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. 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@ requests.
--
-- 'maxResults', 'listUsers_maxResults' - The maximum number of results to be returned per request. This parameter
-- is used in the @ListUsers@ and @ListGroups@ requests to specify how many
-- results to return in one page. The length limit is 50 characters.
--
-- '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.
--
-- '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 numbers 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'
    { $sel:filters:ListUsers' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListUsers' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListUsers' :: Maybe Text
nextToken = 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@ requests.
listUsers_filters :: Lens.Lens' ListUsers (Prelude.Maybe [Filter])
listUsers_filters :: Lens' ListUsers (Maybe [Filter])
listUsers_filters = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The maximum number of results to be returned per request. This parameter
-- is used in the @ListUsers@ and @ListGroups@ requests 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 :: Lens' ListUsers (Maybe Natural)
listUsers_maxResults = 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 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 :: Lens' ListUsers (Maybe Text)
listUsers_nextToken = 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 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 numbers 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 :: Lens' ListUsers Text
listUsers_identityStoreId = 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.AWSPager ListUsers where
  page :: ListUsers -> AWSResponse ListUsers -> Maybe ListUsers
page ListUsers
rq AWSResponse ListUsers
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListUsers
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListUsersResponse (Maybe Text)
listUsersResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop (AWSResponse ListUsers
rs forall s a. s -> Getting a s a -> a
Lens.^. Lens' ListUsersResponse [User]
listUsersResponse_users) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListUsers
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListUsers (Maybe Text)
listUsers_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListUsers
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListUsersResponse (Maybe Text)
listUsersResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListUsers where
  type AWSResponse ListUsers = ListUsersResponse
  request :: (Service -> Service) -> ListUsers -> Request ListUsers
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListUsers
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListUsers)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> 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'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Users" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ListUsers where
  hashWithSalt :: Int -> ListUsers -> Int
hashWithSalt Int
_salt ListUsers' {Maybe Natural
Maybe [Filter]
Maybe Text
Text
identityStoreId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:identityStoreId:ListUsers' :: ListUsers -> Text
$sel:nextToken:ListUsers' :: ListUsers -> Maybe Text
$sel:maxResults:ListUsers' :: ListUsers -> Maybe Natural
$sel:filters:ListUsers' :: ListUsers -> Maybe [Filter]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Filter]
filters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
identityStoreId

instance Prelude.NFData ListUsers where
  rnf :: ListUsers -> ()
rnf ListUsers' {Maybe Natural
Maybe [Filter]
Maybe Text
Text
identityStoreId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:identityStoreId:ListUsers' :: ListUsers -> Text
$sel:nextToken:ListUsers' :: ListUsers -> Maybe Text
$sel:maxResults:ListUsers' :: ListUsers -> Maybe Natural
$sel:filters:ListUsers' :: ListUsers -> Maybe [Filter]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Filter]
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
identityStoreId

instance Data.ToHeaders ListUsers where
  toHeaders :: ListUsers -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# (ByteString
"AWSIdentityStore.ListUsers" :: Prelude.ByteString),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON ListUsers where
  toJSON :: ListUsers -> Value
toJSON ListUsers' {Maybe Natural
Maybe [Filter]
Maybe Text
Text
identityStoreId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:identityStoreId:ListUsers' :: ListUsers -> Text
$sel:nextToken:ListUsers' :: ListUsers -> Maybe Text
$sel:maxResults:ListUsers' :: ListUsers -> Maybe Natural
$sel:filters:ListUsers' :: ListUsers -> Maybe [Filter]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Filters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters,
            (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"IdentityStoreId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
identityStoreId)
          ]
      )

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

instance Data.ToQuery ListUsers where
  toQuery :: ListUsers -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const 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
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
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. 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'
    { $sel:nextToken:ListUsersResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListUsersResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:users:ListUsersResponse' :: [User]
users = 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 :: Lens' ListUsersResponse (Maybe Text)
listUsersResponse_nextToken = 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 :: Lens' ListUsersResponse Int
listUsersResponse_httpStatus = 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 :: Lens' ListUsersResponse [User]
listUsersResponse_users = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListUsersResponse where
  rnf :: ListUsersResponse -> ()
rnf ListUsersResponse' {Int
[User]
Maybe Text
users :: [User]
httpStatus :: Int
nextToken :: Maybe Text
$sel:users:ListUsersResponse' :: ListUsersResponse -> [User]
$sel:httpStatus:ListUsersResponse' :: ListUsersResponse -> Int
$sel:nextToken:ListUsersResponse' :: ListUsersResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [User]
users