{-# 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.ElastiCache.DescribeUserGroups
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of user groups.
--
-- This operation returns paginated results.
module Amazonka.ElastiCache.DescribeUserGroups
  ( -- * Creating a Request
    DescribeUserGroups (..),
    newDescribeUserGroups,

    -- * Request Lenses
    describeUserGroups_marker,
    describeUserGroups_maxRecords,
    describeUserGroups_userGroupId,

    -- * Destructuring the Response
    DescribeUserGroupsResponse (..),
    newDescribeUserGroupsResponse,

    -- * Response Lenses
    describeUserGroupsResponse_marker,
    describeUserGroupsResponse_userGroups,
    describeUserGroupsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeUserGroups' smart constructor.
data DescribeUserGroups = DescribeUserGroups'
  { -- | An optional marker returned from a prior request. Use this marker for
    -- pagination of results from this operation. If this parameter is
    -- specified, the response includes only records beyond the marker, up to
    -- the value specified by MaxRecords. >
    DescribeUserGroups -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of records to include in the response. If more
    -- records exist than the specified MaxRecords value, a marker is included
    -- in the response so that the remaining results can be retrieved.
    DescribeUserGroups -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
    -- | The ID of the user group.
    DescribeUserGroups -> Maybe Text
userGroupId :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeUserGroups -> DescribeUserGroups -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeUserGroups -> DescribeUserGroups -> Bool
$c/= :: DescribeUserGroups -> DescribeUserGroups -> Bool
== :: DescribeUserGroups -> DescribeUserGroups -> Bool
$c== :: DescribeUserGroups -> DescribeUserGroups -> Bool
Prelude.Eq, ReadPrec [DescribeUserGroups]
ReadPrec DescribeUserGroups
Int -> ReadS DescribeUserGroups
ReadS [DescribeUserGroups]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeUserGroups]
$creadListPrec :: ReadPrec [DescribeUserGroups]
readPrec :: ReadPrec DescribeUserGroups
$creadPrec :: ReadPrec DescribeUserGroups
readList :: ReadS [DescribeUserGroups]
$creadList :: ReadS [DescribeUserGroups]
readsPrec :: Int -> ReadS DescribeUserGroups
$creadsPrec :: Int -> ReadS DescribeUserGroups
Prelude.Read, Int -> DescribeUserGroups -> ShowS
[DescribeUserGroups] -> ShowS
DescribeUserGroups -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeUserGroups] -> ShowS
$cshowList :: [DescribeUserGroups] -> ShowS
show :: DescribeUserGroups -> String
$cshow :: DescribeUserGroups -> String
showsPrec :: Int -> DescribeUserGroups -> ShowS
$cshowsPrec :: Int -> DescribeUserGroups -> ShowS
Prelude.Show, forall x. Rep DescribeUserGroups x -> DescribeUserGroups
forall x. DescribeUserGroups -> Rep DescribeUserGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeUserGroups x -> DescribeUserGroups
$cfrom :: forall x. DescribeUserGroups -> Rep DescribeUserGroups x
Prelude.Generic)

-- |
-- Create a value of 'DescribeUserGroups' 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:
--
-- 'marker', 'describeUserGroups_marker' - An optional marker returned from a prior request. Use this marker for
-- pagination of results from this operation. If this parameter is
-- specified, the response includes only records beyond the marker, up to
-- the value specified by MaxRecords. >
--
-- 'maxRecords', 'describeUserGroups_maxRecords' - The maximum number of records to include in the response. If more
-- records exist than the specified MaxRecords value, a marker is included
-- in the response so that the remaining results can be retrieved.
--
-- 'userGroupId', 'describeUserGroups_userGroupId' - The ID of the user group.
newDescribeUserGroups ::
  DescribeUserGroups
newDescribeUserGroups :: DescribeUserGroups
newDescribeUserGroups =
  DescribeUserGroups'
    { $sel:marker:DescribeUserGroups' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeUserGroups' :: Maybe Int
maxRecords = forall a. Maybe a
Prelude.Nothing,
      $sel:userGroupId:DescribeUserGroups' :: Maybe Text
userGroupId = forall a. Maybe a
Prelude.Nothing
    }

-- | An optional marker returned from a prior request. Use this marker for
-- pagination of results from this operation. If this parameter is
-- specified, the response includes only records beyond the marker, up to
-- the value specified by MaxRecords. >
describeUserGroups_marker :: Lens.Lens' DescribeUserGroups (Prelude.Maybe Prelude.Text)
describeUserGroups_marker :: Lens' DescribeUserGroups (Maybe Text)
describeUserGroups_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeUserGroups' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeUserGroups' :: DescribeUserGroups -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeUserGroups
s@DescribeUserGroups' {} Maybe Text
a -> DescribeUserGroups
s {$sel:marker:DescribeUserGroups' :: Maybe Text
marker = Maybe Text
a} :: DescribeUserGroups)

-- | The maximum number of records to include in the response. If more
-- records exist than the specified MaxRecords value, a marker is included
-- in the response so that the remaining results can be retrieved.
describeUserGroups_maxRecords :: Lens.Lens' DescribeUserGroups (Prelude.Maybe Prelude.Int)
describeUserGroups_maxRecords :: Lens' DescribeUserGroups (Maybe Int)
describeUserGroups_maxRecords = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeUserGroups' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeUserGroups' :: DescribeUserGroups -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeUserGroups
s@DescribeUserGroups' {} Maybe Int
a -> DescribeUserGroups
s {$sel:maxRecords:DescribeUserGroups' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeUserGroups)

-- | The ID of the user group.
describeUserGroups_userGroupId :: Lens.Lens' DescribeUserGroups (Prelude.Maybe Prelude.Text)
describeUserGroups_userGroupId :: Lens' DescribeUserGroups (Maybe Text)
describeUserGroups_userGroupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeUserGroups' {Maybe Text
userGroupId :: Maybe Text
$sel:userGroupId:DescribeUserGroups' :: DescribeUserGroups -> Maybe Text
userGroupId} -> Maybe Text
userGroupId) (\s :: DescribeUserGroups
s@DescribeUserGroups' {} Maybe Text
a -> DescribeUserGroups
s {$sel:userGroupId:DescribeUserGroups' :: Maybe Text
userGroupId = Maybe Text
a} :: DescribeUserGroups)

instance Core.AWSPager DescribeUserGroups where
  page :: DescribeUserGroups
-> AWSResponse DescribeUserGroups -> Maybe DescribeUserGroups
page DescribeUserGroups
rq AWSResponse DescribeUserGroups
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeUserGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeUserGroupsResponse (Maybe Text)
describeUserGroupsResponse_marker
            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 DescribeUserGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeUserGroupsResponse (Maybe [UserGroup])
describeUserGroupsResponse_userGroups
            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
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribeUserGroups
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeUserGroups (Maybe Text)
describeUserGroups_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeUserGroups
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeUserGroupsResponse (Maybe Text)
describeUserGroupsResponse_marker
          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 DescribeUserGroups where
  type
    AWSResponse DescribeUserGroups =
      DescribeUserGroupsResponse
  request :: (Service -> Service)
-> DescribeUserGroups -> Request DescribeUserGroups
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeUserGroups
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeUserGroups)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DescribeUserGroupsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [UserGroup] -> Int -> DescribeUserGroupsResponse
DescribeUserGroupsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Marker")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"UserGroups"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                        )
            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 DescribeUserGroups where
  hashWithSalt :: Int -> DescribeUserGroups -> Int
hashWithSalt Int
_salt DescribeUserGroups' {Maybe Int
Maybe Text
userGroupId :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
$sel:userGroupId:DescribeUserGroups' :: DescribeUserGroups -> Maybe Text
$sel:maxRecords:DescribeUserGroups' :: DescribeUserGroups -> Maybe Int
$sel:marker:DescribeUserGroups' :: DescribeUserGroups -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxRecords
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userGroupId

instance Prelude.NFData DescribeUserGroups where
  rnf :: DescribeUserGroups -> ()
rnf DescribeUserGroups' {Maybe Int
Maybe Text
userGroupId :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
$sel:userGroupId:DescribeUserGroups' :: DescribeUserGroups -> Maybe Text
$sel:maxRecords:DescribeUserGroups' :: DescribeUserGroups -> Maybe Int
$sel:marker:DescribeUserGroups' :: DescribeUserGroups -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxRecords
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
userGroupId

instance Data.ToHeaders DescribeUserGroups where
  toHeaders :: DescribeUserGroups -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

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

instance Data.ToQuery DescribeUserGroups where
  toQuery :: DescribeUserGroups -> QueryString
toQuery DescribeUserGroups' {Maybe Int
Maybe Text
userGroupId :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
$sel:userGroupId:DescribeUserGroups' :: DescribeUserGroups -> Maybe Text
$sel:maxRecords:DescribeUserGroups' :: DescribeUserGroups -> Maybe Int
$sel:marker:DescribeUserGroups' :: DescribeUserGroups -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeUserGroups" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
        ByteString
"Marker" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
marker,
        ByteString
"MaxRecords" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
maxRecords,
        ByteString
"UserGroupId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
userGroupId
      ]

-- | /See:/ 'newDescribeUserGroupsResponse' smart constructor.
data DescribeUserGroupsResponse = DescribeUserGroupsResponse'
  { -- | An optional marker returned from a prior request. Use this marker for
    -- pagination of results from this operation. If this parameter is
    -- specified, the response includes only records beyond the marker, up to
    -- the value specified by MaxRecords. >
    DescribeUserGroupsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | Returns a list of user groups.
    DescribeUserGroupsResponse -> Maybe [UserGroup]
userGroups :: Prelude.Maybe [UserGroup],
    -- | The response's http status code.
    DescribeUserGroupsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeUserGroupsResponse -> DescribeUserGroupsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeUserGroupsResponse -> DescribeUserGroupsResponse -> Bool
$c/= :: DescribeUserGroupsResponse -> DescribeUserGroupsResponse -> Bool
== :: DescribeUserGroupsResponse -> DescribeUserGroupsResponse -> Bool
$c== :: DescribeUserGroupsResponse -> DescribeUserGroupsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeUserGroupsResponse]
ReadPrec DescribeUserGroupsResponse
Int -> ReadS DescribeUserGroupsResponse
ReadS [DescribeUserGroupsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeUserGroupsResponse]
$creadListPrec :: ReadPrec [DescribeUserGroupsResponse]
readPrec :: ReadPrec DescribeUserGroupsResponse
$creadPrec :: ReadPrec DescribeUserGroupsResponse
readList :: ReadS [DescribeUserGroupsResponse]
$creadList :: ReadS [DescribeUserGroupsResponse]
readsPrec :: Int -> ReadS DescribeUserGroupsResponse
$creadsPrec :: Int -> ReadS DescribeUserGroupsResponse
Prelude.Read, Int -> DescribeUserGroupsResponse -> ShowS
[DescribeUserGroupsResponse] -> ShowS
DescribeUserGroupsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeUserGroupsResponse] -> ShowS
$cshowList :: [DescribeUserGroupsResponse] -> ShowS
show :: DescribeUserGroupsResponse -> String
$cshow :: DescribeUserGroupsResponse -> String
showsPrec :: Int -> DescribeUserGroupsResponse -> ShowS
$cshowsPrec :: Int -> DescribeUserGroupsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeUserGroupsResponse x -> DescribeUserGroupsResponse
forall x.
DescribeUserGroupsResponse -> Rep DescribeUserGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeUserGroupsResponse x -> DescribeUserGroupsResponse
$cfrom :: forall x.
DescribeUserGroupsResponse -> Rep DescribeUserGroupsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeUserGroupsResponse' 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:
--
-- 'marker', 'describeUserGroupsResponse_marker' - An optional marker returned from a prior request. Use this marker for
-- pagination of results from this operation. If this parameter is
-- specified, the response includes only records beyond the marker, up to
-- the value specified by MaxRecords. >
--
-- 'userGroups', 'describeUserGroupsResponse_userGroups' - Returns a list of user groups.
--
-- 'httpStatus', 'describeUserGroupsResponse_httpStatus' - The response's http status code.
newDescribeUserGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeUserGroupsResponse
newDescribeUserGroupsResponse :: Int -> DescribeUserGroupsResponse
newDescribeUserGroupsResponse Int
pHttpStatus_ =
  DescribeUserGroupsResponse'
    { $sel:marker:DescribeUserGroupsResponse' :: Maybe Text
marker =
        forall a. Maybe a
Prelude.Nothing,
      $sel:userGroups:DescribeUserGroupsResponse' :: Maybe [UserGroup]
userGroups = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeUserGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An optional marker returned from a prior request. Use this marker for
-- pagination of results from this operation. If this parameter is
-- specified, the response includes only records beyond the marker, up to
-- the value specified by MaxRecords. >
describeUserGroupsResponse_marker :: Lens.Lens' DescribeUserGroupsResponse (Prelude.Maybe Prelude.Text)
describeUserGroupsResponse_marker :: Lens' DescribeUserGroupsResponse (Maybe Text)
describeUserGroupsResponse_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeUserGroupsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeUserGroupsResponse' :: DescribeUserGroupsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeUserGroupsResponse
s@DescribeUserGroupsResponse' {} Maybe Text
a -> DescribeUserGroupsResponse
s {$sel:marker:DescribeUserGroupsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeUserGroupsResponse)

-- | Returns a list of user groups.
describeUserGroupsResponse_userGroups :: Lens.Lens' DescribeUserGroupsResponse (Prelude.Maybe [UserGroup])
describeUserGroupsResponse_userGroups :: Lens' DescribeUserGroupsResponse (Maybe [UserGroup])
describeUserGroupsResponse_userGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeUserGroupsResponse' {Maybe [UserGroup]
userGroups :: Maybe [UserGroup]
$sel:userGroups:DescribeUserGroupsResponse' :: DescribeUserGroupsResponse -> Maybe [UserGroup]
userGroups} -> Maybe [UserGroup]
userGroups) (\s :: DescribeUserGroupsResponse
s@DescribeUserGroupsResponse' {} Maybe [UserGroup]
a -> DescribeUserGroupsResponse
s {$sel:userGroups:DescribeUserGroupsResponse' :: Maybe [UserGroup]
userGroups = Maybe [UserGroup]
a} :: DescribeUserGroupsResponse) 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 response's http status code.
describeUserGroupsResponse_httpStatus :: Lens.Lens' DescribeUserGroupsResponse Prelude.Int
describeUserGroupsResponse_httpStatus :: Lens' DescribeUserGroupsResponse Int
describeUserGroupsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeUserGroupsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeUserGroupsResponse' :: DescribeUserGroupsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeUserGroupsResponse
s@DescribeUserGroupsResponse' {} Int
a -> DescribeUserGroupsResponse
s {$sel:httpStatus:DescribeUserGroupsResponse' :: Int
httpStatus = Int
a} :: DescribeUserGroupsResponse)

instance Prelude.NFData DescribeUserGroupsResponse where
  rnf :: DescribeUserGroupsResponse -> ()
rnf DescribeUserGroupsResponse' {Int
Maybe [UserGroup]
Maybe Text
httpStatus :: Int
userGroups :: Maybe [UserGroup]
marker :: Maybe Text
$sel:httpStatus:DescribeUserGroupsResponse' :: DescribeUserGroupsResponse -> Int
$sel:userGroups:DescribeUserGroupsResponse' :: DescribeUserGroupsResponse -> Maybe [UserGroup]
$sel:marker:DescribeUserGroupsResponse' :: DescribeUserGroupsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [UserGroup]
userGroups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus