{-# 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.IAM.GetGroup
-- 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 IAM users that are in the specified IAM group. You can
-- paginate the results using the @MaxItems@ and @Marker@ parameters.
--
-- This operation returns paginated results.
module Amazonka.IAM.GetGroup
  ( -- * Creating a Request
    GetGroup (..),
    newGetGroup,

    -- * Request Lenses
    getGroup_marker,
    getGroup_maxItems,
    getGroup_groupName,

    -- * Destructuring the Response
    GetGroupResponse (..),
    newGetGroupResponse,

    -- * Response Lenses
    getGroupResponse_isTruncated,
    getGroupResponse_marker,
    getGroupResponse_httpStatus,
    getGroupResponse_group,
    getGroupResponse_users,
  )
where

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

-- | /See:/ 'newGetGroup' smart constructor.
data GetGroup = GetGroup'
  { -- | Use this parameter only when paginating results and only after you
    -- receive a response indicating that the results are truncated. Set it to
    -- the value of the @Marker@ element in the response that you received to
    -- indicate where the next call should start.
    GetGroup -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | Use this only when paginating results to indicate the maximum number of
    -- items you want in the response. If additional items exist beyond the
    -- maximum you specify, the @IsTruncated@ response element is @true@.
    --
    -- If you do not include this parameter, the number of items defaults to
    -- 100. Note that IAM might return fewer results, even when there are more
    -- results available. In that case, the @IsTruncated@ response element
    -- returns @true@, and @Marker@ contains a value to include in the
    -- subsequent call that tells the service where to continue from.
    GetGroup -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural,
    -- | The name of the group.
    --
    -- This parameter allows (through its
    -- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
    -- consisting of upper and lowercase alphanumeric characters with no
    -- spaces. You can also include any of the following characters: _+=,.\@-
    GetGroup -> Text
groupName :: Prelude.Text
  }
  deriving (GetGroup -> GetGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetGroup -> GetGroup -> Bool
$c/= :: GetGroup -> GetGroup -> Bool
== :: GetGroup -> GetGroup -> Bool
$c== :: GetGroup -> GetGroup -> Bool
Prelude.Eq, ReadPrec [GetGroup]
ReadPrec GetGroup
Int -> ReadS GetGroup
ReadS [GetGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetGroup]
$creadListPrec :: ReadPrec [GetGroup]
readPrec :: ReadPrec GetGroup
$creadPrec :: ReadPrec GetGroup
readList :: ReadS [GetGroup]
$creadList :: ReadS [GetGroup]
readsPrec :: Int -> ReadS GetGroup
$creadsPrec :: Int -> ReadS GetGroup
Prelude.Read, Int -> GetGroup -> ShowS
[GetGroup] -> ShowS
GetGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetGroup] -> ShowS
$cshowList :: [GetGroup] -> ShowS
show :: GetGroup -> String
$cshow :: GetGroup -> String
showsPrec :: Int -> GetGroup -> ShowS
$cshowsPrec :: Int -> GetGroup -> ShowS
Prelude.Show, forall x. Rep GetGroup x -> GetGroup
forall x. GetGroup -> Rep GetGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetGroup x -> GetGroup
$cfrom :: forall x. GetGroup -> Rep GetGroup x
Prelude.Generic)

-- |
-- Create a value of 'GetGroup' 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', 'getGroup_marker' - Use this parameter only when paginating results and only after you
-- receive a response indicating that the results are truncated. Set it to
-- the value of the @Marker@ element in the response that you received to
-- indicate where the next call should start.
--
-- 'maxItems', 'getGroup_maxItems' - Use this only when paginating results to indicate the maximum number of
-- items you want in the response. If additional items exist beyond the
-- maximum you specify, the @IsTruncated@ response element is @true@.
--
-- If you do not include this parameter, the number of items defaults to
-- 100. Note that IAM might return fewer results, even when there are more
-- results available. In that case, the @IsTruncated@ response element
-- returns @true@, and @Marker@ contains a value to include in the
-- subsequent call that tells the service where to continue from.
--
-- 'groupName', 'getGroup_groupName' - The name of the group.
--
-- This parameter allows (through its
-- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
-- consisting of upper and lowercase alphanumeric characters with no
-- spaces. You can also include any of the following characters: _+=,.\@-
newGetGroup ::
  -- | 'groupName'
  Prelude.Text ->
  GetGroup
newGetGroup :: Text -> GetGroup
newGetGroup Text
pGroupName_ =
  GetGroup'
    { $sel:marker:GetGroup' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:GetGroup' :: Maybe Natural
maxItems = forall a. Maybe a
Prelude.Nothing,
      $sel:groupName:GetGroup' :: Text
groupName = Text
pGroupName_
    }

-- | Use this parameter only when paginating results and only after you
-- receive a response indicating that the results are truncated. Set it to
-- the value of the @Marker@ element in the response that you received to
-- indicate where the next call should start.
getGroup_marker :: Lens.Lens' GetGroup (Prelude.Maybe Prelude.Text)
getGroup_marker :: Lens' GetGroup (Maybe Text)
getGroup_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroup' {Maybe Text
marker :: Maybe Text
$sel:marker:GetGroup' :: GetGroup -> Maybe Text
marker} -> Maybe Text
marker) (\s :: GetGroup
s@GetGroup' {} Maybe Text
a -> GetGroup
s {$sel:marker:GetGroup' :: Maybe Text
marker = Maybe Text
a} :: GetGroup)

-- | Use this only when paginating results to indicate the maximum number of
-- items you want in the response. If additional items exist beyond the
-- maximum you specify, the @IsTruncated@ response element is @true@.
--
-- If you do not include this parameter, the number of items defaults to
-- 100. Note that IAM might return fewer results, even when there are more
-- results available. In that case, the @IsTruncated@ response element
-- returns @true@, and @Marker@ contains a value to include in the
-- subsequent call that tells the service where to continue from.
getGroup_maxItems :: Lens.Lens' GetGroup (Prelude.Maybe Prelude.Natural)
getGroup_maxItems :: Lens' GetGroup (Maybe Natural)
getGroup_maxItems = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroup' {Maybe Natural
maxItems :: Maybe Natural
$sel:maxItems:GetGroup' :: GetGroup -> Maybe Natural
maxItems} -> Maybe Natural
maxItems) (\s :: GetGroup
s@GetGroup' {} Maybe Natural
a -> GetGroup
s {$sel:maxItems:GetGroup' :: Maybe Natural
maxItems = Maybe Natural
a} :: GetGroup)

-- | The name of the group.
--
-- This parameter allows (through its
-- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
-- consisting of upper and lowercase alphanumeric characters with no
-- spaces. You can also include any of the following characters: _+=,.\@-
getGroup_groupName :: Lens.Lens' GetGroup Prelude.Text
getGroup_groupName :: Lens' GetGroup Text
getGroup_groupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroup' {Text
groupName :: Text
$sel:groupName:GetGroup' :: GetGroup -> Text
groupName} -> Text
groupName) (\s :: GetGroup
s@GetGroup' {} Text
a -> GetGroup
s {$sel:groupName:GetGroup' :: Text
groupName = Text
a} :: GetGroup)

instance Core.AWSPager GetGroup where
  page :: GetGroup -> AWSResponse GetGroup -> Maybe GetGroup
page GetGroup
rq AWSResponse GetGroup
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetGroup
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetGroupResponse (Maybe Bool)
getGroupResponse_isTruncated
            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. Maybe a -> Bool
Prelude.isNothing
        ( AWSResponse GetGroup
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetGroupResponse (Maybe Text)
getGroupResponse_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
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ GetGroup
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetGroup (Maybe Text)
getGroup_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetGroup
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetGroupResponse (Maybe Text)
getGroupResponse_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 GetGroup where
  type AWSResponse GetGroup = GetGroupResponse
  request :: (Service -> Service) -> GetGroup -> Request GetGroup
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 GetGroup
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetGroup)))
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
"GetGroupResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Bool
-> Maybe Text -> Int -> Group -> [User] -> GetGroupResponse
GetGroupResponse'
            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
"IsTruncated")
            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
"Marker")
            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.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"Group")
            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
"Users"
                            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 a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member"
                        )
      )

instance Prelude.Hashable GetGroup where
  hashWithSalt :: Int -> GetGroup -> Int
hashWithSalt Int
_salt GetGroup' {Maybe Natural
Maybe Text
Text
groupName :: Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:groupName:GetGroup' :: GetGroup -> Text
$sel:maxItems:GetGroup' :: GetGroup -> Maybe Natural
$sel:marker:GetGroup' :: GetGroup -> 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 Natural
maxItems
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
groupName

instance Prelude.NFData GetGroup where
  rnf :: GetGroup -> ()
rnf GetGroup' {Maybe Natural
Maybe Text
Text
groupName :: Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:groupName:GetGroup' :: GetGroup -> Text
$sel:maxItems:GetGroup' :: GetGroup -> Maybe Natural
$sel:marker:GetGroup' :: GetGroup -> 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 Natural
maxItems
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
groupName

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

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

instance Data.ToQuery GetGroup where
  toQuery :: GetGroup -> QueryString
toQuery GetGroup' {Maybe Natural
Maybe Text
Text
groupName :: Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:groupName:GetGroup' :: GetGroup -> Text
$sel:maxItems:GetGroup' :: GetGroup -> Maybe Natural
$sel:marker:GetGroup' :: GetGroup -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"GetGroup" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
        ByteString
"Marker" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
marker,
        ByteString
"MaxItems" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxItems,
        ByteString
"GroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
groupName
      ]

-- | Contains the response to a successful GetGroup request.
--
-- /See:/ 'newGetGroupResponse' smart constructor.
data GetGroupResponse = GetGroupResponse'
  { -- | A flag that indicates whether there are more items to return. If your
    -- results were truncated, you can make a subsequent pagination request
    -- using the @Marker@ request parameter to retrieve more items. Note that
    -- IAM might return fewer than the @MaxItems@ number of results even when
    -- there are more results available. We recommend that you check
    -- @IsTruncated@ after every call to ensure that you receive all your
    -- results.
    GetGroupResponse -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
    -- | When @IsTruncated@ is @true@, this element is present and contains the
    -- value to use for the @Marker@ parameter in a subsequent pagination
    -- request.
    GetGroupResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetGroupResponse -> Int
httpStatus :: Prelude.Int,
    -- | A structure that contains details about the group.
    GetGroupResponse -> Group
group' :: Group,
    -- | A list of users in the group.
    GetGroupResponse -> [User]
users :: [User]
  }
  deriving (GetGroupResponse -> GetGroupResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetGroupResponse -> GetGroupResponse -> Bool
$c/= :: GetGroupResponse -> GetGroupResponse -> Bool
== :: GetGroupResponse -> GetGroupResponse -> Bool
$c== :: GetGroupResponse -> GetGroupResponse -> Bool
Prelude.Eq, ReadPrec [GetGroupResponse]
ReadPrec GetGroupResponse
Int -> ReadS GetGroupResponse
ReadS [GetGroupResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetGroupResponse]
$creadListPrec :: ReadPrec [GetGroupResponse]
readPrec :: ReadPrec GetGroupResponse
$creadPrec :: ReadPrec GetGroupResponse
readList :: ReadS [GetGroupResponse]
$creadList :: ReadS [GetGroupResponse]
readsPrec :: Int -> ReadS GetGroupResponse
$creadsPrec :: Int -> ReadS GetGroupResponse
Prelude.Read, Int -> GetGroupResponse -> ShowS
[GetGroupResponse] -> ShowS
GetGroupResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetGroupResponse] -> ShowS
$cshowList :: [GetGroupResponse] -> ShowS
show :: GetGroupResponse -> String
$cshow :: GetGroupResponse -> String
showsPrec :: Int -> GetGroupResponse -> ShowS
$cshowsPrec :: Int -> GetGroupResponse -> ShowS
Prelude.Show, forall x. Rep GetGroupResponse x -> GetGroupResponse
forall x. GetGroupResponse -> Rep GetGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetGroupResponse x -> GetGroupResponse
$cfrom :: forall x. GetGroupResponse -> Rep GetGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetGroupResponse' 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:
--
-- 'isTruncated', 'getGroupResponse_isTruncated' - A flag that indicates whether there are more items to return. If your
-- results were truncated, you can make a subsequent pagination request
-- using the @Marker@ request parameter to retrieve more items. Note that
-- IAM might return fewer than the @MaxItems@ number of results even when
-- there are more results available. We recommend that you check
-- @IsTruncated@ after every call to ensure that you receive all your
-- results.
--
-- 'marker', 'getGroupResponse_marker' - When @IsTruncated@ is @true@, this element is present and contains the
-- value to use for the @Marker@ parameter in a subsequent pagination
-- request.
--
-- 'httpStatus', 'getGroupResponse_httpStatus' - The response's http status code.
--
-- 'group'', 'getGroupResponse_group' - A structure that contains details about the group.
--
-- 'users', 'getGroupResponse_users' - A list of users in the group.
newGetGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'group''
  Group ->
  GetGroupResponse
newGetGroupResponse :: Int -> Group -> GetGroupResponse
newGetGroupResponse Int
pHttpStatus_ Group
pGroup_ =
  GetGroupResponse'
    { $sel:isTruncated:GetGroupResponse' :: Maybe Bool
isTruncated = forall a. Maybe a
Prelude.Nothing,
      $sel:marker:GetGroupResponse' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetGroupResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:group':GetGroupResponse' :: Group
group' = Group
pGroup_,
      $sel:users:GetGroupResponse' :: [User]
users = forall a. Monoid a => a
Prelude.mempty
    }

-- | A flag that indicates whether there are more items to return. If your
-- results were truncated, you can make a subsequent pagination request
-- using the @Marker@ request parameter to retrieve more items. Note that
-- IAM might return fewer than the @MaxItems@ number of results even when
-- there are more results available. We recommend that you check
-- @IsTruncated@ after every call to ensure that you receive all your
-- results.
getGroupResponse_isTruncated :: Lens.Lens' GetGroupResponse (Prelude.Maybe Prelude.Bool)
getGroupResponse_isTruncated :: Lens' GetGroupResponse (Maybe Bool)
getGroupResponse_isTruncated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroupResponse' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:GetGroupResponse' :: GetGroupResponse -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: GetGroupResponse
s@GetGroupResponse' {} Maybe Bool
a -> GetGroupResponse
s {$sel:isTruncated:GetGroupResponse' :: Maybe Bool
isTruncated = Maybe Bool
a} :: GetGroupResponse)

-- | When @IsTruncated@ is @true@, this element is present and contains the
-- value to use for the @Marker@ parameter in a subsequent pagination
-- request.
getGroupResponse_marker :: Lens.Lens' GetGroupResponse (Prelude.Maybe Prelude.Text)
getGroupResponse_marker :: Lens' GetGroupResponse (Maybe Text)
getGroupResponse_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroupResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:GetGroupResponse' :: GetGroupResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: GetGroupResponse
s@GetGroupResponse' {} Maybe Text
a -> GetGroupResponse
s {$sel:marker:GetGroupResponse' :: Maybe Text
marker = Maybe Text
a} :: GetGroupResponse)

-- | The response's http status code.
getGroupResponse_httpStatus :: Lens.Lens' GetGroupResponse Prelude.Int
getGroupResponse_httpStatus :: Lens' GetGroupResponse Int
getGroupResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetGroupResponse' :: GetGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetGroupResponse
s@GetGroupResponse' {} Int
a -> GetGroupResponse
s {$sel:httpStatus:GetGroupResponse' :: Int
httpStatus = Int
a} :: GetGroupResponse)

-- | A structure that contains details about the group.
getGroupResponse_group :: Lens.Lens' GetGroupResponse Group
getGroupResponse_group :: Lens' GetGroupResponse Group
getGroupResponse_group = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroupResponse' {Group
group' :: Group
$sel:group':GetGroupResponse' :: GetGroupResponse -> Group
group'} -> Group
group') (\s :: GetGroupResponse
s@GetGroupResponse' {} Group
a -> GetGroupResponse
s {$sel:group':GetGroupResponse' :: Group
group' = Group
a} :: GetGroupResponse)

-- | A list of users in the group.
getGroupResponse_users :: Lens.Lens' GetGroupResponse [User]
getGroupResponse_users :: Lens' GetGroupResponse [User]
getGroupResponse_users = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroupResponse' {[User]
users :: [User]
$sel:users:GetGroupResponse' :: GetGroupResponse -> [User]
users} -> [User]
users) (\s :: GetGroupResponse
s@GetGroupResponse' {} [User]
a -> GetGroupResponse
s {$sel:users:GetGroupResponse' :: [User]
users = [User]
a} :: GetGroupResponse) 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 GetGroupResponse where
  rnf :: GetGroupResponse -> ()
rnf GetGroupResponse' {Int
[User]
Maybe Bool
Maybe Text
Group
users :: [User]
group' :: Group
httpStatus :: Int
marker :: Maybe Text
isTruncated :: Maybe Bool
$sel:users:GetGroupResponse' :: GetGroupResponse -> [User]
$sel:group':GetGroupResponse' :: GetGroupResponse -> Group
$sel:httpStatus:GetGroupResponse' :: GetGroupResponse -> Int
$sel:marker:GetGroupResponse' :: GetGroupResponse -> Maybe Text
$sel:isTruncated:GetGroupResponse' :: GetGroupResponse -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isTruncated
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Group
group'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [User]
users