{-# 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.ListUserGroups
-- 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 the Amazon QuickSight groups that an Amazon QuickSight user is a
-- member of.
module Amazonka.QuickSight.ListUserGroups
  ( -- * Creating a Request
    ListUserGroups (..),
    newListUserGroups,

    -- * Request Lenses
    listUserGroups_maxResults,
    listUserGroups_nextToken,
    listUserGroups_userName,
    listUserGroups_awsAccountId,
    listUserGroups_namespace,

    -- * Destructuring the Response
    ListUserGroupsResponse (..),
    newListUserGroupsResponse,

    -- * Response Lenses
    listUserGroupsResponse_groupList,
    listUserGroupsResponse_nextToken,
    listUserGroupsResponse_requestId,
    listUserGroupsResponse_status,
  )
where

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

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

-- |
-- Create a value of 'ListUserGroups' 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:
--
-- 'maxResults', 'listUserGroups_maxResults' - The maximum number of results to return from this request.
--
-- 'nextToken', 'listUserGroups_nextToken' - A pagination token that can be used in a subsequent request.
--
-- 'userName', 'listUserGroups_userName' - The Amazon QuickSight user name that you want to list group memberships
-- for.
--
-- 'awsAccountId', 'listUserGroups_awsAccountId' - The Amazon Web Services account ID that the user is in. Currently, you
-- use the ID for the Amazon Web Services account that contains your Amazon
-- QuickSight account.
--
-- 'namespace', 'listUserGroups_namespace' - The namespace. Currently, you should set this to @default@.
newListUserGroups ::
  -- | 'userName'
  Prelude.Text ->
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'namespace'
  Prelude.Text ->
  ListUserGroups
newListUserGroups :: Text -> Text -> Text -> ListUserGroups
newListUserGroups
  Text
pUserName_
  Text
pAwsAccountId_
  Text
pNamespace_ =
    ListUserGroups'
      { $sel:maxResults:ListUserGroups' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListUserGroups' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:userName:ListUserGroups' :: Text
userName = Text
pUserName_,
        $sel:awsAccountId:ListUserGroups' :: Text
awsAccountId = Text
pAwsAccountId_,
        $sel:namespace:ListUserGroups' :: Text
namespace = Text
pNamespace_
      }

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

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

-- | The Amazon QuickSight user name that you want to list group memberships
-- for.
listUserGroups_userName :: Lens.Lens' ListUserGroups Prelude.Text
listUserGroups_userName :: Lens' ListUserGroups Text
listUserGroups_userName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUserGroups' {Text
userName :: Text
$sel:userName:ListUserGroups' :: ListUserGroups -> Text
userName} -> Text
userName) (\s :: ListUserGroups
s@ListUserGroups' {} Text
a -> ListUserGroups
s {$sel:userName:ListUserGroups' :: Text
userName = Text
a} :: ListUserGroups)

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

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

instance Core.AWSRequest ListUserGroups where
  type
    AWSResponse ListUserGroups =
      ListUserGroupsResponse
  request :: (Service -> Service) -> ListUserGroups -> Request ListUserGroups
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListUserGroups
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListUserGroups)))
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 [Group]
-> Maybe Text -> Maybe Text -> Int -> ListUserGroupsResponse
ListUserGroupsResponse'
            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
"GroupList" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            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
"NextToken")
            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
"RequestId")
            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))
      )

instance Prelude.Hashable ListUserGroups where
  hashWithSalt :: Int -> ListUserGroups -> Int
hashWithSalt Int
_salt ListUserGroups' {Maybe Natural
Maybe Text
Text
namespace :: Text
awsAccountId :: Text
userName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:namespace:ListUserGroups' :: ListUserGroups -> Text
$sel:awsAccountId:ListUserGroups' :: ListUserGroups -> Text
$sel:userName:ListUserGroups' :: ListUserGroups -> Text
$sel:nextToken:ListUserGroups' :: ListUserGroups -> Maybe Text
$sel:maxResults:ListUserGroups' :: ListUserGroups -> Maybe Natural
..} =
    Int
_salt
      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
userName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
awsAccountId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
namespace

instance Prelude.NFData ListUserGroups where
  rnf :: ListUserGroups -> ()
rnf ListUserGroups' {Maybe Natural
Maybe Text
Text
namespace :: Text
awsAccountId :: Text
userName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:namespace:ListUserGroups' :: ListUserGroups -> Text
$sel:awsAccountId:ListUserGroups' :: ListUserGroups -> Text
$sel:userName:ListUserGroups' :: ListUserGroups -> Text
$sel:nextToken:ListUserGroups' :: ListUserGroups -> Maybe Text
$sel:maxResults:ListUserGroups' :: ListUserGroups -> Maybe Natural
..} =
    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
userName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
awsAccountId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
namespace

instance Data.ToHeaders ListUserGroups where
  toHeaders :: ListUserGroups -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

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

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

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

-- |
-- Create a value of 'ListUserGroupsResponse' 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:
--
-- 'groupList', 'listUserGroupsResponse_groupList' - The list of groups the user is a member of.
--
-- 'nextToken', 'listUserGroupsResponse_nextToken' - A pagination token that can be used in a subsequent request.
--
-- 'requestId', 'listUserGroupsResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'status', 'listUserGroupsResponse_status' - The HTTP status of the request.
newListUserGroupsResponse ::
  -- | 'status'
  Prelude.Int ->
  ListUserGroupsResponse
newListUserGroupsResponse :: Int -> ListUserGroupsResponse
newListUserGroupsResponse Int
pStatus_ =
  ListUserGroupsResponse'
    { $sel:groupList:ListUserGroupsResponse' :: Maybe [Group]
groupList =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListUserGroupsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:requestId:ListUserGroupsResponse' :: Maybe Text
requestId = forall a. Maybe a
Prelude.Nothing,
      $sel:status:ListUserGroupsResponse' :: Int
status = Int
pStatus_
    }

-- | The list of groups the user is a member of.
listUserGroupsResponse_groupList :: Lens.Lens' ListUserGroupsResponse (Prelude.Maybe [Group])
listUserGroupsResponse_groupList :: Lens' ListUserGroupsResponse (Maybe [Group])
listUserGroupsResponse_groupList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUserGroupsResponse' {Maybe [Group]
groupList :: Maybe [Group]
$sel:groupList:ListUserGroupsResponse' :: ListUserGroupsResponse -> Maybe [Group]
groupList} -> Maybe [Group]
groupList) (\s :: ListUserGroupsResponse
s@ListUserGroupsResponse' {} Maybe [Group]
a -> ListUserGroupsResponse
s {$sel:groupList:ListUserGroupsResponse' :: Maybe [Group]
groupList = Maybe [Group]
a} :: ListUserGroupsResponse) 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

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

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

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

instance Prelude.NFData ListUserGroupsResponse where
  rnf :: ListUserGroupsResponse -> ()
rnf ListUserGroupsResponse' {Int
Maybe [Group]
Maybe Text
status :: Int
requestId :: Maybe Text
nextToken :: Maybe Text
groupList :: Maybe [Group]
$sel:status:ListUserGroupsResponse' :: ListUserGroupsResponse -> Int
$sel:requestId:ListUserGroupsResponse' :: ListUserGroupsResponse -> Maybe Text
$sel:nextToken:ListUserGroupsResponse' :: ListUserGroupsResponse -> Maybe Text
$sel:groupList:ListUserGroupsResponse' :: ListUserGroupsResponse -> Maybe [Group]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Group]
groupList
      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 Maybe Text
requestId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
status