{-# 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.ManagedBlockChain.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)
--
-- Returns a list of the members in a network and properties of their
-- configurations.
--
-- Applies only to Hyperledger Fabric.
module Amazonka.ManagedBlockChain.ListMembers
  ( -- * Creating a Request
    ListMembers (..),
    newListMembers,

    -- * Request Lenses
    listMembers_status,
    listMembers_nextToken,
    listMembers_name,
    listMembers_isOwned,
    listMembers_maxResults,
    listMembers_networkId,

    -- * 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.ManagedBlockChain.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'
  { -- | An optional status specifier. If provided, only members currently in
    -- this status are listed.
    ListMembers -> Maybe MemberStatus
status :: Prelude.Maybe MemberStatus,
    -- | The pagination token that indicates the next set of results to retrieve.
    ListMembers -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The optional name of the member to list.
    ListMembers -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | An optional Boolean value. If provided, the request is limited either to
    -- members that the current AWS account owns (@true@) or that other AWS
    -- accounts own (@false@). If omitted, all members are listed.
    ListMembers -> Maybe Bool
isOwned :: Prelude.Maybe Prelude.Bool,
    -- | The maximum number of members to return in the request.
    ListMembers -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The unique identifier of the network for which to list members.
    ListMembers -> Text
networkId :: Prelude.Text
  }
  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:
--
-- 'status', 'listMembers_status' - An optional status specifier. If provided, only members currently in
-- this status are listed.
--
-- 'nextToken', 'listMembers_nextToken' - The pagination token that indicates the next set of results to retrieve.
--
-- 'name', 'listMembers_name' - The optional name of the member to list.
--
-- 'isOwned', 'listMembers_isOwned' - An optional Boolean value. If provided, the request is limited either to
-- members that the current AWS account owns (@true@) or that other AWS
-- accounts own (@false@). If omitted, all members are listed.
--
-- 'maxResults', 'listMembers_maxResults' - The maximum number of members to return in the request.
--
-- 'networkId', 'listMembers_networkId' - The unique identifier of the network for which to list members.
newListMembers ::
  -- | 'networkId'
  Prelude.Text ->
  ListMembers
newListMembers :: Text -> ListMembers
newListMembers Text
pNetworkId_ =
  ListMembers' :: Maybe MemberStatus
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Natural
-> Text
-> ListMembers
ListMembers'
    { $sel:status:ListMembers' :: Maybe MemberStatus
status = Maybe MemberStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListMembers' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ListMembers' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:isOwned:ListMembers' :: Maybe Bool
isOwned = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListMembers' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:networkId:ListMembers' :: Text
networkId = Text
pNetworkId_
    }

-- | An optional status specifier. If provided, only members currently in
-- this status are listed.
listMembers_status :: Lens.Lens' ListMembers (Prelude.Maybe MemberStatus)
listMembers_status :: (Maybe MemberStatus -> f (Maybe MemberStatus))
-> ListMembers -> f ListMembers
listMembers_status = (ListMembers -> Maybe MemberStatus)
-> (ListMembers -> Maybe MemberStatus -> ListMembers)
-> Lens
     ListMembers ListMembers (Maybe MemberStatus) (Maybe MemberStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMembers' {Maybe MemberStatus
status :: Maybe MemberStatus
$sel:status:ListMembers' :: ListMembers -> Maybe MemberStatus
status} -> Maybe MemberStatus
status) (\s :: ListMembers
s@ListMembers' {} Maybe MemberStatus
a -> ListMembers
s {$sel:status:ListMembers' :: Maybe MemberStatus
status = Maybe MemberStatus
a} :: ListMembers)

-- | The pagination token that indicates the next set of results to retrieve.
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)

-- | The optional name of the member to list.
listMembers_name :: Lens.Lens' ListMembers (Prelude.Maybe Prelude.Text)
listMembers_name :: (Maybe Text -> f (Maybe Text)) -> ListMembers -> f ListMembers
listMembers_name = (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
name :: Maybe Text
$sel:name:ListMembers' :: ListMembers -> Maybe Text
name} -> Maybe Text
name) (\s :: ListMembers
s@ListMembers' {} Maybe Text
a -> ListMembers
s {$sel:name:ListMembers' :: Maybe Text
name = Maybe Text
a} :: ListMembers)

-- | An optional Boolean value. If provided, the request is limited either to
-- members that the current AWS account owns (@true@) or that other AWS
-- accounts own (@false@). If omitted, all members are listed.
listMembers_isOwned :: Lens.Lens' ListMembers (Prelude.Maybe Prelude.Bool)
listMembers_isOwned :: (Maybe Bool -> f (Maybe Bool)) -> ListMembers -> f ListMembers
listMembers_isOwned = (ListMembers -> Maybe Bool)
-> (ListMembers -> Maybe Bool -> ListMembers)
-> Lens ListMembers ListMembers (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMembers' {Maybe Bool
isOwned :: Maybe Bool
$sel:isOwned:ListMembers' :: ListMembers -> Maybe Bool
isOwned} -> Maybe Bool
isOwned) (\s :: ListMembers
s@ListMembers' {} Maybe Bool
a -> ListMembers
s {$sel:isOwned:ListMembers' :: Maybe Bool
isOwned = Maybe Bool
a} :: ListMembers)

-- | The maximum number of members to return in the request.
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)

-- | The unique identifier of the network for which to list members.
listMembers_networkId :: Lens.Lens' ListMembers Prelude.Text
listMembers_networkId :: (Text -> f Text) -> ListMembers -> f ListMembers
listMembers_networkId = (ListMembers -> Text)
-> (ListMembers -> Text -> ListMembers)
-> Lens ListMembers ListMembers Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMembers' {Text
networkId :: Text
$sel:networkId:ListMembers' :: ListMembers -> Text
networkId} -> Text
networkId) (\s :: ListMembers
s@ListMembers' {} Text
a -> ListMembers
s {$sel:networkId:ListMembers' :: Text
networkId = Text
a} :: ListMembers)

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 [MemberSummary] -> Maybe Text -> Int -> ListMembersResponse
ListMembersResponse'
            (Maybe [MemberSummary] -> Maybe Text -> Int -> ListMembersResponse)
-> Either String (Maybe [MemberSummary])
-> 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 [MemberSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Members" Either String (Maybe (Maybe [MemberSummary]))
-> Maybe [MemberSummary] -> Either String (Maybe [MemberSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [MemberSummary]
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 ListMembers' {Maybe Bool
Maybe Natural
Maybe Text
Maybe MemberStatus
Text
networkId :: Text
maxResults :: Maybe Natural
isOwned :: Maybe Bool
name :: Maybe Text
nextToken :: Maybe Text
status :: Maybe MemberStatus
$sel:networkId:ListMembers' :: ListMembers -> Text
$sel:maxResults:ListMembers' :: ListMembers -> Maybe Natural
$sel:isOwned:ListMembers' :: ListMembers -> Maybe Bool
$sel:name:ListMembers' :: ListMembers -> Maybe Text
$sel:nextToken:ListMembers' :: ListMembers -> Maybe Text
$sel:status:ListMembers' :: ListMembers -> Maybe MemberStatus
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/networks/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
networkId, ByteString
"/members"]

instance Core.ToQuery ListMembers where
  toQuery :: ListMembers -> QueryString
toQuery ListMembers' {Maybe Bool
Maybe Natural
Maybe Text
Maybe MemberStatus
Text
networkId :: Text
maxResults :: Maybe Natural
isOwned :: Maybe Bool
name :: Maybe Text
nextToken :: Maybe Text
status :: Maybe MemberStatus
$sel:networkId:ListMembers' :: ListMembers -> Text
$sel:maxResults:ListMembers' :: ListMembers -> Maybe Natural
$sel:isOwned:ListMembers' :: ListMembers -> Maybe Bool
$sel:name:ListMembers' :: ListMembers -> Maybe Text
$sel:nextToken:ListMembers' :: ListMembers -> Maybe Text
$sel:status:ListMembers' :: ListMembers -> Maybe MemberStatus
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"status" ByteString -> Maybe MemberStatus -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe MemberStatus
status,
        ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"name" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
name,
        ByteString
"isOwned" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
isOwned,
        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 @MemberSummary@ objects. Each object contains details about
    -- a network member.
    ListMembersResponse -> Maybe [MemberSummary]
members :: Prelude.Maybe [MemberSummary],
    -- | The pagination token that indicates the next set of results to retrieve.
    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 @MemberSummary@ objects. Each object contains details about
-- a network member.
--
-- 'nextToken', 'listMembersResponse_nextToken' - The pagination token that indicates the next set of results to retrieve.
--
-- 'httpStatus', 'listMembersResponse_httpStatus' - The response's http status code.
newListMembersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListMembersResponse
newListMembersResponse :: Int -> ListMembersResponse
newListMembersResponse Int
pHttpStatus_ =
  ListMembersResponse' :: Maybe [MemberSummary] -> Maybe Text -> Int -> ListMembersResponse
ListMembersResponse'
    { $sel:members:ListMembersResponse' :: Maybe [MemberSummary]
members = Maybe [MemberSummary]
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 @MemberSummary@ objects. Each object contains details about
-- a network member.
listMembersResponse_members :: Lens.Lens' ListMembersResponse (Prelude.Maybe [MemberSummary])
listMembersResponse_members :: (Maybe [MemberSummary] -> f (Maybe [MemberSummary]))
-> ListMembersResponse -> f ListMembersResponse
listMembersResponse_members = (ListMembersResponse -> Maybe [MemberSummary])
-> (ListMembersResponse
    -> Maybe [MemberSummary] -> ListMembersResponse)
-> Lens
     ListMembersResponse
     ListMembersResponse
     (Maybe [MemberSummary])
     (Maybe [MemberSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMembersResponse' {Maybe [MemberSummary]
members :: Maybe [MemberSummary]
$sel:members:ListMembersResponse' :: ListMembersResponse -> Maybe [MemberSummary]
members} -> Maybe [MemberSummary]
members) (\s :: ListMembersResponse
s@ListMembersResponse' {} Maybe [MemberSummary]
a -> ListMembersResponse
s {$sel:members:ListMembersResponse' :: Maybe [MemberSummary]
members = Maybe [MemberSummary]
a} :: ListMembersResponse) ((Maybe [MemberSummary] -> f (Maybe [MemberSummary]))
 -> ListMembersResponse -> f ListMembersResponse)
-> ((Maybe [MemberSummary] -> f (Maybe [MemberSummary]))
    -> Maybe [MemberSummary] -> f (Maybe [MemberSummary]))
-> (Maybe [MemberSummary] -> f (Maybe [MemberSummary]))
-> ListMembersResponse
-> f ListMembersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [MemberSummary] [MemberSummary] [MemberSummary] [MemberSummary]
-> Iso
     (Maybe [MemberSummary])
     (Maybe [MemberSummary])
     (Maybe [MemberSummary])
     (Maybe [MemberSummary])
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
  [MemberSummary] [MemberSummary] [MemberSummary] [MemberSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The pagination token that indicates the next set of results to retrieve.
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 ListMembersResponse (Maybe Text) (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