{-# 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.MacieV2.ListMembers
-- 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)
--
-- Retrieves information about the accounts that are associated with an
-- Amazon Macie administrator account.
--
-- This operation returns paginated results.
module Amazonka.MacieV2.ListMembers
  ( -- * Creating a Request
    ListMembers (..),
    newListMembers,

    -- * Request Lenses
    listMembers_nextToken,
    listMembers_onlyAssociated,
    listMembers_maxResults,

    -- * Destructuring the Response
    ListMembersResponse (..),
    newListMembersResponse,

    -- * Response Lenses
    listMembersResponse_members,
    listMembersResponse_nextToken,
    listMembersResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListMembers' smart constructor.
data ListMembers = ListMembers'
  { -- | The nextToken string that specifies which page of results to return in a
    -- paginated response.
    ListMembers -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Specifies which accounts to include in the response, based on the status
    -- of an account\'s relationship with the administrator account. By
    -- default, the response includes only current member accounts. To include
    -- all accounts, set this value to false.
    ListMembers -> Maybe Text
onlyAssociated :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of items to include in each page of a paginated
    -- response.
    ListMembers -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListMembers -> ListMembers -> Bool
(ListMembers -> ListMembers -> Bool)
-> (ListMembers -> ListMembers -> Bool) -> Eq ListMembers
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMembers -> ListMembers -> Bool
$c/= :: ListMembers -> ListMembers -> Bool
== :: ListMembers -> ListMembers -> Bool
$c== :: ListMembers -> ListMembers -> Bool
Prelude.Eq, ReadPrec [ListMembers]
ReadPrec ListMembers
Int -> ReadS ListMembers
ReadS [ListMembers]
(Int -> ReadS ListMembers)
-> ReadS [ListMembers]
-> ReadPrec ListMembers
-> ReadPrec [ListMembers]
-> Read ListMembers
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMembers]
$creadListPrec :: ReadPrec [ListMembers]
readPrec :: ReadPrec ListMembers
$creadPrec :: ReadPrec ListMembers
readList :: ReadS [ListMembers]
$creadList :: ReadS [ListMembers]
readsPrec :: Int -> ReadS ListMembers
$creadsPrec :: Int -> ReadS ListMembers
Prelude.Read, Int -> ListMembers -> ShowS
[ListMembers] -> ShowS
ListMembers -> String
(Int -> ListMembers -> ShowS)
-> (ListMembers -> String)
-> ([ListMembers] -> ShowS)
-> Show ListMembers
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMembers] -> ShowS
$cshowList :: [ListMembers] -> ShowS
show :: ListMembers -> String
$cshow :: ListMembers -> String
showsPrec :: Int -> ListMembers -> ShowS
$cshowsPrec :: Int -> ListMembers -> ShowS
Prelude.Show, (forall x. ListMembers -> Rep ListMembers x)
-> (forall x. Rep ListMembers x -> ListMembers)
-> Generic ListMembers
forall x. Rep ListMembers x -> ListMembers
forall x. ListMembers -> Rep ListMembers x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMembers x -> ListMembers
$cfrom :: forall x. ListMembers -> Rep ListMembers x
Prelude.Generic)

-- |
-- Create a value of 'ListMembers' 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', 'listMembers_nextToken' - The nextToken string that specifies which page of results to return in a
-- paginated response.
--
-- 'onlyAssociated', 'listMembers_onlyAssociated' - Specifies which accounts to include in the response, based on the status
-- of an account\'s relationship with the administrator account. By
-- default, the response includes only current member accounts. To include
-- all accounts, set this value to false.
--
-- 'maxResults', 'listMembers_maxResults' - The maximum number of items to include in each page of a paginated
-- response.
newListMembers ::
  ListMembers
newListMembers :: ListMembers
newListMembers =
  ListMembers' :: Maybe Text -> Maybe Text -> Maybe Natural -> ListMembers
ListMembers'
    { $sel:nextToken:ListMembers' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:onlyAssociated:ListMembers' :: Maybe Text
onlyAssociated = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListMembers' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The nextToken string that specifies which page of results to return in a
-- paginated response.
listMembers_nextToken :: Lens.Lens' ListMembers (Prelude.Maybe Prelude.Text)
listMembers_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListMembers -> f ListMembers
listMembers_nextToken = (ListMembers -> Maybe Text)
-> (ListMembers -> Maybe Text -> ListMembers)
-> Lens ListMembers ListMembers (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMembers' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMembers' :: ListMembers -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMembers
s@ListMembers' {} Maybe Text
a -> ListMembers
s {$sel:nextToken:ListMembers' :: Maybe Text
nextToken = Maybe Text
a} :: ListMembers)

-- | Specifies which accounts to include in the response, based on the status
-- of an account\'s relationship with the administrator account. By
-- default, the response includes only current member accounts. To include
-- all accounts, set this value to false.
listMembers_onlyAssociated :: Lens.Lens' ListMembers (Prelude.Maybe Prelude.Text)
listMembers_onlyAssociated :: (Maybe Text -> f (Maybe Text)) -> ListMembers -> f ListMembers
listMembers_onlyAssociated = (ListMembers -> Maybe Text)
-> (ListMembers -> Maybe Text -> ListMembers)
-> Lens ListMembers ListMembers (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMembers' {Maybe Text
onlyAssociated :: Maybe Text
$sel:onlyAssociated:ListMembers' :: ListMembers -> Maybe Text
onlyAssociated} -> Maybe Text
onlyAssociated) (\s :: ListMembers
s@ListMembers' {} Maybe Text
a -> ListMembers
s {$sel:onlyAssociated:ListMembers' :: Maybe Text
onlyAssociated = Maybe Text
a} :: ListMembers)

-- | The maximum number of items to include in each page of a paginated
-- response.
listMembers_maxResults :: Lens.Lens' ListMembers (Prelude.Maybe Prelude.Natural)
listMembers_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListMembers -> f ListMembers
listMembers_maxResults = (ListMembers -> Maybe Natural)
-> (ListMembers -> Maybe Natural -> ListMembers)
-> Lens ListMembers ListMembers (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMembers' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListMembers' :: ListMembers -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListMembers
s@ListMembers' {} Maybe Natural
a -> ListMembers
s {$sel:maxResults:ListMembers' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListMembers)

instance Core.AWSPager ListMembers where
  page :: ListMembers -> AWSResponse ListMembers -> Maybe ListMembers
page ListMembers
rq AWSResponse ListMembers
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListMembers
ListMembersResponse
rs
            ListMembersResponse
-> Getting (First Text) ListMembersResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListMembersResponse -> Const (First Text) ListMembersResponse
Lens' ListMembersResponse (Maybe Text)
listMembersResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListMembersResponse -> Const (First Text) ListMembersResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListMembersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListMembers
forall a. Maybe a
Prelude.Nothing
    | Maybe [Member] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListMembers
ListMembersResponse
rs
            ListMembersResponse
-> Getting (First [Member]) ListMembersResponse [Member]
-> Maybe [Member]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Member] -> Const (First [Member]) (Maybe [Member]))
-> ListMembersResponse
-> Const (First [Member]) ListMembersResponse
Lens' ListMembersResponse (Maybe [Member])
listMembersResponse_members ((Maybe [Member] -> Const (First [Member]) (Maybe [Member]))
 -> ListMembersResponse
 -> Const (First [Member]) ListMembersResponse)
-> (([Member] -> Const (First [Member]) [Member])
    -> Maybe [Member] -> Const (First [Member]) (Maybe [Member]))
-> Getting (First [Member]) ListMembersResponse [Member]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Member] -> Const (First [Member]) [Member])
-> Maybe [Member] -> Const (First [Member]) (Maybe [Member])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListMembers
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListMembers -> Maybe ListMembers
forall a. a -> Maybe a
Prelude.Just (ListMembers -> Maybe ListMembers)
-> ListMembers -> Maybe ListMembers
forall a b. (a -> b) -> a -> b
Prelude.$
        ListMembers
rq
          ListMembers -> (ListMembers -> ListMembers) -> ListMembers
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListMembers -> Identity ListMembers
Lens ListMembers ListMembers (Maybe Text) (Maybe Text)
listMembers_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListMembers -> Identity ListMembers)
-> Maybe Text -> ListMembers -> ListMembers
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListMembers
ListMembersResponse
rs
          ListMembersResponse
-> Getting (First Text) ListMembersResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListMembersResponse -> Const (First Text) ListMembersResponse
Lens' ListMembersResponse (Maybe Text)
listMembersResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListMembersResponse -> Const (First Text) ListMembersResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListMembersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListMembers where
  type AWSResponse ListMembers = ListMembersResponse
  request :: ListMembers -> Request ListMembers
request = Service -> ListMembers -> Request ListMembers
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListMembers
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListMembers)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListMembers))
-> Logger
-> Service
-> Proxy ListMembers
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListMembers)))
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 [Member] -> Maybe Text -> Int -> ListMembersResponse
ListMembersResponse'
            (Maybe [Member] -> Maybe Text -> Int -> ListMembersResponse)
-> Either String (Maybe [Member])
-> Either String (Maybe Text -> Int -> ListMembersResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Member]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"members" Either String (Maybe (Maybe [Member]))
-> Maybe [Member] -> Either String (Maybe [Member])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Member]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe Text -> Int -> ListMembersResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListMembersResponse)
forall (f :: * -> *) a b. Applicative f => 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 -> ListMembersResponse)
-> Either String Int -> Either String ListMembersResponse
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))
      )

instance Prelude.Hashable ListMembers

instance Prelude.NFData ListMembers

instance Core.ToHeaders ListMembers where
  toHeaders :: ListMembers -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListMembers -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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.ToPath ListMembers where
  toPath :: ListMembers -> ByteString
toPath = ByteString -> ListMembers -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/members"

instance Core.ToQuery ListMembers where
  toQuery :: ListMembers -> QueryString
toQuery ListMembers' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
onlyAssociated :: Maybe Text
nextToken :: Maybe Text
$sel:maxResults:ListMembers' :: ListMembers -> Maybe Natural
$sel:onlyAssociated:ListMembers' :: ListMembers -> Maybe Text
$sel:nextToken:ListMembers' :: ListMembers -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"onlyAssociated" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
onlyAssociated,
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListMembersResponse' smart constructor.
data ListMembersResponse = ListMembersResponse'
  { -- | An array of objects, one for each account that\'s associated with the
    -- administrator account and meets the criteria specified by the
    -- onlyAssociated request parameter.
    ListMembersResponse -> Maybe [Member]
members :: Prelude.Maybe [Member],
    -- | The string to use in a subsequent request to get the next page of
    -- results in a paginated response. This value is null if there are no
    -- additional pages.
    ListMembersResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListMembersResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListMembersResponse -> ListMembersResponse -> Bool
(ListMembersResponse -> ListMembersResponse -> Bool)
-> (ListMembersResponse -> ListMembersResponse -> Bool)
-> Eq ListMembersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMembersResponse -> ListMembersResponse -> Bool
$c/= :: ListMembersResponse -> ListMembersResponse -> Bool
== :: ListMembersResponse -> ListMembersResponse -> Bool
$c== :: ListMembersResponse -> ListMembersResponse -> Bool
Prelude.Eq, ReadPrec [ListMembersResponse]
ReadPrec ListMembersResponse
Int -> ReadS ListMembersResponse
ReadS [ListMembersResponse]
(Int -> ReadS ListMembersResponse)
-> ReadS [ListMembersResponse]
-> ReadPrec ListMembersResponse
-> ReadPrec [ListMembersResponse]
-> Read ListMembersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMembersResponse]
$creadListPrec :: ReadPrec [ListMembersResponse]
readPrec :: ReadPrec ListMembersResponse
$creadPrec :: ReadPrec ListMembersResponse
readList :: ReadS [ListMembersResponse]
$creadList :: ReadS [ListMembersResponse]
readsPrec :: Int -> ReadS ListMembersResponse
$creadsPrec :: Int -> ReadS ListMembersResponse
Prelude.Read, Int -> ListMembersResponse -> ShowS
[ListMembersResponse] -> ShowS
ListMembersResponse -> String
(Int -> ListMembersResponse -> ShowS)
-> (ListMembersResponse -> String)
-> ([ListMembersResponse] -> ShowS)
-> Show ListMembersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMembersResponse] -> ShowS
$cshowList :: [ListMembersResponse] -> ShowS
show :: ListMembersResponse -> String
$cshow :: ListMembersResponse -> String
showsPrec :: Int -> ListMembersResponse -> ShowS
$cshowsPrec :: Int -> ListMembersResponse -> ShowS
Prelude.Show, (forall x. ListMembersResponse -> Rep ListMembersResponse x)
-> (forall x. Rep ListMembersResponse x -> ListMembersResponse)
-> Generic ListMembersResponse
forall x. Rep ListMembersResponse x -> ListMembersResponse
forall x. ListMembersResponse -> Rep ListMembersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMembersResponse x -> ListMembersResponse
$cfrom :: forall x. ListMembersResponse -> Rep ListMembersResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListMembersResponse' 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:
--
-- 'members', 'listMembersResponse_members' - An array of objects, one for each account that\'s associated with the
-- administrator account and meets the criteria specified by the
-- onlyAssociated request parameter.
--
-- 'nextToken', 'listMembersResponse_nextToken' - The string to use in a subsequent request to get the next page of
-- results in a paginated response. This value is null if there are no
-- additional pages.
--
-- 'httpStatus', 'listMembersResponse_httpStatus' - The response's http status code.
newListMembersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListMembersResponse
newListMembersResponse :: Int -> ListMembersResponse
newListMembersResponse Int
pHttpStatus_ =
  ListMembersResponse' :: Maybe [Member] -> Maybe Text -> Int -> ListMembersResponse
ListMembersResponse'
    { $sel:members:ListMembersResponse' :: Maybe [Member]
members = Maybe [Member]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListMembersResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListMembersResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of objects, one for each account that\'s associated with the
-- administrator account and meets the criteria specified by the
-- onlyAssociated request parameter.
listMembersResponse_members :: Lens.Lens' ListMembersResponse (Prelude.Maybe [Member])
listMembersResponse_members :: (Maybe [Member] -> f (Maybe [Member]))
-> ListMembersResponse -> f ListMembersResponse
listMembersResponse_members = (ListMembersResponse -> Maybe [Member])
-> (ListMembersResponse -> Maybe [Member] -> ListMembersResponse)
-> Lens' ListMembersResponse (Maybe [Member])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMembersResponse' {Maybe [Member]
members :: Maybe [Member]
$sel:members:ListMembersResponse' :: ListMembersResponse -> Maybe [Member]
members} -> Maybe [Member]
members) (\s :: ListMembersResponse
s@ListMembersResponse' {} Maybe [Member]
a -> ListMembersResponse
s {$sel:members:ListMembersResponse' :: Maybe [Member]
members = Maybe [Member]
a} :: ListMembersResponse) ((Maybe [Member] -> f (Maybe [Member]))
 -> ListMembersResponse -> f ListMembersResponse)
-> ((Maybe [Member] -> f (Maybe [Member]))
    -> Maybe [Member] -> f (Maybe [Member]))
-> (Maybe [Member] -> f (Maybe [Member]))
-> ListMembersResponse
-> f ListMembersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Member] [Member] [Member] [Member]
-> Iso
     (Maybe [Member]) (Maybe [Member]) (Maybe [Member]) (Maybe [Member])
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 [Member] [Member] [Member] [Member]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The string to use in a subsequent request to get the next page of
-- results in a paginated response. This value is null if there are no
-- additional pages.
listMembersResponse_nextToken :: Lens.Lens' ListMembersResponse (Prelude.Maybe Prelude.Text)
listMembersResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMembersResponse -> f ListMembersResponse
listMembersResponse_nextToken = (ListMembersResponse -> Maybe Text)
-> (ListMembersResponse -> Maybe Text -> ListMembersResponse)
-> Lens' ListMembersResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMembersResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMembersResponse' :: ListMembersResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMembersResponse
s@ListMembersResponse' {} Maybe Text
a -> ListMembersResponse
s {$sel:nextToken:ListMembersResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListMembersResponse)

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

instance Prelude.NFData ListMembersResponse