{-# 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.ListGroups
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the attribute name and value of the group that you specified in
-- the search. We only support @DisplayName@ as a valid filter attribute
-- path currently, and filter is required. This API returns minimum
-- attributes, including @GroupId@ and group @DisplayName@ in the response.
module Amazonka.IdentityStore.ListGroups
  ( -- * Creating a Request
    ListGroups (..),
    newListGroups,

    -- * Request Lenses
    listGroups_filters,
    listGroups_nextToken,
    listGroups_maxResults,
    listGroups_identityStoreId,

    -- * Destructuring the Response
    ListGroupsResponse (..),
    newListGroupsResponse,

    -- * Response Lenses
    listGroupsResponse_nextToken,
    listGroupsResponse_httpStatus,
    listGroupsResponse_groups,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IdentityStore.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListGroups' smart constructor.
data ListGroups = ListGroups'
  { -- | A list of @Filter@ objects, which is used in the @ListUsers@ and
    -- @ListGroups@ request.
    ListGroups -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The pagination token used for the @ListUsers@ and @ListGroups@ API
    -- operations. This value is generated by the identity store service. It is
    -- returned in the API response if the total results are more than the size
    -- of one page. This token is also returned when it is used in the API
    -- request to search for the next page.
    ListGroups -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to be returned per request. This parameter
    -- is used in the @ListUsers@ and @ListGroups@ request to specify how many
    -- results to return in one page. The length limit is 50 characters.
    ListGroups -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The globally unique identifier for the identity store, such as
    -- @d-1234567890@. In this example, @d-@ is a fixed prefix, and
    -- @1234567890@ is a randomly generated string that contains number and
    -- lower case letters. This value is generated at the time that a new
    -- identity store is created.
    ListGroups -> Text
identityStoreId :: Prelude.Text
  }
  deriving (ListGroups -> ListGroups -> Bool
(ListGroups -> ListGroups -> Bool)
-> (ListGroups -> ListGroups -> Bool) -> Eq ListGroups
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListGroups -> ListGroups -> Bool
$c/= :: ListGroups -> ListGroups -> Bool
== :: ListGroups -> ListGroups -> Bool
$c== :: ListGroups -> ListGroups -> Bool
Prelude.Eq, Int -> ListGroups -> ShowS
[ListGroups] -> ShowS
ListGroups -> String
(Int -> ListGroups -> ShowS)
-> (ListGroups -> String)
-> ([ListGroups] -> ShowS)
-> Show ListGroups
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListGroups] -> ShowS
$cshowList :: [ListGroups] -> ShowS
show :: ListGroups -> String
$cshow :: ListGroups -> String
showsPrec :: Int -> ListGroups -> ShowS
$cshowsPrec :: Int -> ListGroups -> ShowS
Prelude.Show, (forall x. ListGroups -> Rep ListGroups x)
-> (forall x. Rep ListGroups x -> ListGroups) -> Generic ListGroups
forall x. Rep ListGroups x -> ListGroups
forall x. ListGroups -> Rep ListGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListGroups x -> ListGroups
$cfrom :: forall x. ListGroups -> Rep ListGroups x
Prelude.Generic)

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

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

-- | The pagination token used for the @ListUsers@ and @ListGroups@ API
-- operations. This value is generated by the identity store service. It is
-- returned in the API response if the total results are more than the size
-- of one page. This token is also returned when it is used in the API
-- request to search for the next page.
listGroups_nextToken :: Lens.Lens' ListGroups (Prelude.Maybe Prelude.Text)
listGroups_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListGroups -> f ListGroups
listGroups_nextToken = (ListGroups -> Maybe Text)
-> (ListGroups -> Maybe Text -> ListGroups)
-> Lens ListGroups ListGroups (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGroups' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListGroups' :: ListGroups -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListGroups
s@ListGroups' {} Maybe Text
a -> ListGroups
s {$sel:nextToken:ListGroups' :: Maybe Text
nextToken = Maybe Text
a} :: ListGroups)

-- | The maximum number of results to be returned per request. This parameter
-- is used in the @ListUsers@ and @ListGroups@ request to specify how many
-- results to return in one page. The length limit is 50 characters.
listGroups_maxResults :: Lens.Lens' ListGroups (Prelude.Maybe Prelude.Natural)
listGroups_maxResults :: (Maybe Natural -> f (Maybe Natural)) -> ListGroups -> f ListGroups
listGroups_maxResults = (ListGroups -> Maybe Natural)
-> (ListGroups -> Maybe Natural -> ListGroups)
-> Lens ListGroups ListGroups (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGroups' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListGroups' :: ListGroups -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListGroups
s@ListGroups' {} Maybe Natural
a -> ListGroups
s {$sel:maxResults:ListGroups' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListGroups)

-- | The globally unique identifier for the identity store, such as
-- @d-1234567890@. In this example, @d-@ is a fixed prefix, and
-- @1234567890@ is a randomly generated string that contains number and
-- lower case letters. This value is generated at the time that a new
-- identity store is created.
listGroups_identityStoreId :: Lens.Lens' ListGroups Prelude.Text
listGroups_identityStoreId :: (Text -> f Text) -> ListGroups -> f ListGroups
listGroups_identityStoreId = (ListGroups -> Text)
-> (ListGroups -> Text -> ListGroups)
-> Lens ListGroups ListGroups Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGroups' {Text
identityStoreId :: Text
$sel:identityStoreId:ListGroups' :: ListGroups -> Text
identityStoreId} -> Text
identityStoreId) (\s :: ListGroups
s@ListGroups' {} Text
a -> ListGroups
s {$sel:identityStoreId:ListGroups' :: Text
identityStoreId = Text
a} :: ListGroups)

instance Core.AWSRequest ListGroups where
  type AWSResponse ListGroups = ListGroupsResponse
  request :: ListGroups -> Request ListGroups
request = Service -> ListGroups -> Request ListGroups
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListGroups
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListGroups)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListGroups))
-> Logger
-> Service
-> Proxy ListGroups
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListGroups)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> [Group] -> ListGroupsResponse
ListGroupsResponse'
            (Maybe Text -> Int -> [Group] -> ListGroupsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> [Group] -> ListGroupsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either String (Int -> [Group] -> ListGroupsResponse)
-> Either String Int
-> Either String ([Group] -> ListGroupsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either String ([Group] -> ListGroupsResponse)
-> Either String [Group] -> Either String ListGroupsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe [Group])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Groups" Either String (Maybe [Group]) -> [Group] -> Either String [Group]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Group]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ListGroups

instance Prelude.NFData ListGroups

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

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

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

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

-- | /See:/ 'newListGroupsResponse' smart constructor.
data ListGroupsResponse = ListGroupsResponse'
  { -- | 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 it1 is used in the API
    -- request to search for the next page.
    ListGroupsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListGroupsResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of @Group@ objects in the identity store.
    ListGroupsResponse -> [Group]
groups :: [Group]
  }
  deriving (ListGroupsResponse -> ListGroupsResponse -> Bool
(ListGroupsResponse -> ListGroupsResponse -> Bool)
-> (ListGroupsResponse -> ListGroupsResponse -> Bool)
-> Eq ListGroupsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListGroupsResponse -> ListGroupsResponse -> Bool
$c/= :: ListGroupsResponse -> ListGroupsResponse -> Bool
== :: ListGroupsResponse -> ListGroupsResponse -> Bool
$c== :: ListGroupsResponse -> ListGroupsResponse -> Bool
Prelude.Eq, ReadPrec [ListGroupsResponse]
ReadPrec ListGroupsResponse
Int -> ReadS ListGroupsResponse
ReadS [ListGroupsResponse]
(Int -> ReadS ListGroupsResponse)
-> ReadS [ListGroupsResponse]
-> ReadPrec ListGroupsResponse
-> ReadPrec [ListGroupsResponse]
-> Read ListGroupsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListGroupsResponse]
$creadListPrec :: ReadPrec [ListGroupsResponse]
readPrec :: ReadPrec ListGroupsResponse
$creadPrec :: ReadPrec ListGroupsResponse
readList :: ReadS [ListGroupsResponse]
$creadList :: ReadS [ListGroupsResponse]
readsPrec :: Int -> ReadS ListGroupsResponse
$creadsPrec :: Int -> ReadS ListGroupsResponse
Prelude.Read, Int -> ListGroupsResponse -> ShowS
[ListGroupsResponse] -> ShowS
ListGroupsResponse -> String
(Int -> ListGroupsResponse -> ShowS)
-> (ListGroupsResponse -> String)
-> ([ListGroupsResponse] -> ShowS)
-> Show ListGroupsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListGroupsResponse] -> ShowS
$cshowList :: [ListGroupsResponse] -> ShowS
show :: ListGroupsResponse -> String
$cshow :: ListGroupsResponse -> String
showsPrec :: Int -> ListGroupsResponse -> ShowS
$cshowsPrec :: Int -> ListGroupsResponse -> ShowS
Prelude.Show, (forall x. ListGroupsResponse -> Rep ListGroupsResponse x)
-> (forall x. Rep ListGroupsResponse x -> ListGroupsResponse)
-> Generic ListGroupsResponse
forall x. Rep ListGroupsResponse x -> ListGroupsResponse
forall x. ListGroupsResponse -> Rep ListGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListGroupsResponse x -> ListGroupsResponse
$cfrom :: forall x. ListGroupsResponse -> Rep ListGroupsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListGroupsResponse' 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', 'listGroupsResponse_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 it1 is used in the API
-- request to search for the next page.
--
-- 'httpStatus', 'listGroupsResponse_httpStatus' - The response's http status code.
--
-- 'groups', 'listGroupsResponse_groups' - A list of @Group@ objects in the identity store.
newListGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListGroupsResponse
newListGroupsResponse :: Int -> ListGroupsResponse
newListGroupsResponse Int
pHttpStatus_ =
  ListGroupsResponse' :: Maybe Text -> Int -> [Group] -> ListGroupsResponse
ListGroupsResponse'
    { $sel:nextToken:ListGroupsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:groups:ListGroupsResponse' :: [Group]
groups = [Group]
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 it1 is used in the API
-- request to search for the next page.
listGroupsResponse_nextToken :: Lens.Lens' ListGroupsResponse (Prelude.Maybe Prelude.Text)
listGroupsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListGroupsResponse -> f ListGroupsResponse
listGroupsResponse_nextToken = (ListGroupsResponse -> Maybe Text)
-> (ListGroupsResponse -> Maybe Text -> ListGroupsResponse)
-> Lens
     ListGroupsResponse ListGroupsResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGroupsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListGroupsResponse' :: ListGroupsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListGroupsResponse
s@ListGroupsResponse' {} Maybe Text
a -> ListGroupsResponse
s {$sel:nextToken:ListGroupsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListGroupsResponse)

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

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

instance Prelude.NFData ListGroupsResponse