{-# 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.Detective.GetMembers
-- 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 the membership details for specified member accounts for a
-- behavior graph.
module Amazonka.Detective.GetMembers
  ( -- * Creating a Request
    GetMembers (..),
    newGetMembers,

    -- * Request Lenses
    getMembers_graphArn,
    getMembers_accountIds,

    -- * Destructuring the Response
    GetMembersResponse (..),
    newGetMembersResponse,

    -- * Response Lenses
    getMembersResponse_memberDetails,
    getMembersResponse_unprocessedAccounts,
    getMembersResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Detective.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:/ 'newGetMembers' smart constructor.
data GetMembers = GetMembers'
  { -- | The ARN of the behavior graph for which to request the member details.
    GetMembers -> Text
graphArn :: Prelude.Text,
    -- | The list of AWS account identifiers for the member account for which to
    -- return member details. You can request details for up to 50 member
    -- accounts at a time.
    --
    -- You cannot use @GetMembers@ to retrieve information about member
    -- accounts that were removed from the behavior graph.
    GetMembers -> NonEmpty Text
accountIds :: Prelude.NonEmpty Prelude.Text
  }
  deriving (GetMembers -> GetMembers -> Bool
(GetMembers -> GetMembers -> Bool)
-> (GetMembers -> GetMembers -> Bool) -> Eq GetMembers
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetMembers -> GetMembers -> Bool
$c/= :: GetMembers -> GetMembers -> Bool
== :: GetMembers -> GetMembers -> Bool
$c== :: GetMembers -> GetMembers -> Bool
Prelude.Eq, ReadPrec [GetMembers]
ReadPrec GetMembers
Int -> ReadS GetMembers
ReadS [GetMembers]
(Int -> ReadS GetMembers)
-> ReadS [GetMembers]
-> ReadPrec GetMembers
-> ReadPrec [GetMembers]
-> Read GetMembers
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetMembers]
$creadListPrec :: ReadPrec [GetMembers]
readPrec :: ReadPrec GetMembers
$creadPrec :: ReadPrec GetMembers
readList :: ReadS [GetMembers]
$creadList :: ReadS [GetMembers]
readsPrec :: Int -> ReadS GetMembers
$creadsPrec :: Int -> ReadS GetMembers
Prelude.Read, Int -> GetMembers -> ShowS
[GetMembers] -> ShowS
GetMembers -> String
(Int -> GetMembers -> ShowS)
-> (GetMembers -> String)
-> ([GetMembers] -> ShowS)
-> Show GetMembers
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetMembers] -> ShowS
$cshowList :: [GetMembers] -> ShowS
show :: GetMembers -> String
$cshow :: GetMembers -> String
showsPrec :: Int -> GetMembers -> ShowS
$cshowsPrec :: Int -> GetMembers -> ShowS
Prelude.Show, (forall x. GetMembers -> Rep GetMembers x)
-> (forall x. Rep GetMembers x -> GetMembers) -> Generic GetMembers
forall x. Rep GetMembers x -> GetMembers
forall x. GetMembers -> Rep GetMembers x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetMembers x -> GetMembers
$cfrom :: forall x. GetMembers -> Rep GetMembers x
Prelude.Generic)

-- |
-- Create a value of 'GetMembers' 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:
--
-- 'graphArn', 'getMembers_graphArn' - The ARN of the behavior graph for which to request the member details.
--
-- 'accountIds', 'getMembers_accountIds' - The list of AWS account identifiers for the member account for which to
-- return member details. You can request details for up to 50 member
-- accounts at a time.
--
-- You cannot use @GetMembers@ to retrieve information about member
-- accounts that were removed from the behavior graph.
newGetMembers ::
  -- | 'graphArn'
  Prelude.Text ->
  -- | 'accountIds'
  Prelude.NonEmpty Prelude.Text ->
  GetMembers
newGetMembers :: Text -> NonEmpty Text -> GetMembers
newGetMembers Text
pGraphArn_ NonEmpty Text
pAccountIds_ =
  GetMembers' :: Text -> NonEmpty Text -> GetMembers
GetMembers'
    { $sel:graphArn:GetMembers' :: Text
graphArn = Text
pGraphArn_,
      $sel:accountIds:GetMembers' :: NonEmpty Text
accountIds = Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Text) (Identity (NonEmpty Text))
 -> Tagged (NonEmpty Text) (Identity (NonEmpty Text)))
-> NonEmpty Text -> NonEmpty Text
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pAccountIds_
    }

-- | The ARN of the behavior graph for which to request the member details.
getMembers_graphArn :: Lens.Lens' GetMembers Prelude.Text
getMembers_graphArn :: (Text -> f Text) -> GetMembers -> f GetMembers
getMembers_graphArn = (GetMembers -> Text)
-> (GetMembers -> Text -> GetMembers)
-> Lens GetMembers GetMembers Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMembers' {Text
graphArn :: Text
$sel:graphArn:GetMembers' :: GetMembers -> Text
graphArn} -> Text
graphArn) (\s :: GetMembers
s@GetMembers' {} Text
a -> GetMembers
s {$sel:graphArn:GetMembers' :: Text
graphArn = Text
a} :: GetMembers)

-- | The list of AWS account identifiers for the member account for which to
-- return member details. You can request details for up to 50 member
-- accounts at a time.
--
-- You cannot use @GetMembers@ to retrieve information about member
-- accounts that were removed from the behavior graph.
getMembers_accountIds :: Lens.Lens' GetMembers (Prelude.NonEmpty Prelude.Text)
getMembers_accountIds :: (NonEmpty Text -> f (NonEmpty Text)) -> GetMembers -> f GetMembers
getMembers_accountIds = (GetMembers -> NonEmpty Text)
-> (GetMembers -> NonEmpty Text -> GetMembers)
-> Lens GetMembers GetMembers (NonEmpty Text) (NonEmpty Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMembers' {NonEmpty Text
accountIds :: NonEmpty Text
$sel:accountIds:GetMembers' :: GetMembers -> NonEmpty Text
accountIds} -> NonEmpty Text
accountIds) (\s :: GetMembers
s@GetMembers' {} NonEmpty Text
a -> GetMembers
s {$sel:accountIds:GetMembers' :: NonEmpty Text
accountIds = NonEmpty Text
a} :: GetMembers) ((NonEmpty Text -> f (NonEmpty Text))
 -> GetMembers -> f GetMembers)
-> ((NonEmpty Text -> f (NonEmpty Text))
    -> NonEmpty Text -> f (NonEmpty Text))
-> (NonEmpty Text -> f (NonEmpty Text))
-> GetMembers
-> f GetMembers
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData GetMembers

instance Core.ToHeaders GetMembers where
  toHeaders :: GetMembers -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetMembers -> 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.ToJSON GetMembers where
  toJSON :: GetMembers -> Value
toJSON GetMembers' {NonEmpty Text
Text
accountIds :: NonEmpty Text
graphArn :: Text
$sel:accountIds:GetMembers' :: GetMembers -> NonEmpty Text
$sel:graphArn:GetMembers' :: GetMembers -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"GraphArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
graphArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"AccountIds" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Text
accountIds)
          ]
      )

instance Core.ToPath GetMembers where
  toPath :: GetMembers -> ByteString
toPath = ByteString -> GetMembers -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/graph/members/get"

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

-- | /See:/ 'newGetMembersResponse' smart constructor.
data GetMembersResponse = GetMembersResponse'
  { -- | The member account details that Detective is returning in response to
    -- the request.
    GetMembersResponse -> Maybe [MemberDetail]
memberDetails :: Prelude.Maybe [MemberDetail],
    -- | The requested member accounts for which Detective was unable to return
    -- member details.
    --
    -- For each account, provides the reason why the request could not be
    -- processed.
    GetMembersResponse -> Maybe [UnprocessedAccount]
unprocessedAccounts :: Prelude.Maybe [UnprocessedAccount],
    -- | The response's http status code.
    GetMembersResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetMembersResponse -> GetMembersResponse -> Bool
(GetMembersResponse -> GetMembersResponse -> Bool)
-> (GetMembersResponse -> GetMembersResponse -> Bool)
-> Eq GetMembersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetMembersResponse -> GetMembersResponse -> Bool
$c/= :: GetMembersResponse -> GetMembersResponse -> Bool
== :: GetMembersResponse -> GetMembersResponse -> Bool
$c== :: GetMembersResponse -> GetMembersResponse -> Bool
Prelude.Eq, ReadPrec [GetMembersResponse]
ReadPrec GetMembersResponse
Int -> ReadS GetMembersResponse
ReadS [GetMembersResponse]
(Int -> ReadS GetMembersResponse)
-> ReadS [GetMembersResponse]
-> ReadPrec GetMembersResponse
-> ReadPrec [GetMembersResponse]
-> Read GetMembersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetMembersResponse]
$creadListPrec :: ReadPrec [GetMembersResponse]
readPrec :: ReadPrec GetMembersResponse
$creadPrec :: ReadPrec GetMembersResponse
readList :: ReadS [GetMembersResponse]
$creadList :: ReadS [GetMembersResponse]
readsPrec :: Int -> ReadS GetMembersResponse
$creadsPrec :: Int -> ReadS GetMembersResponse
Prelude.Read, Int -> GetMembersResponse -> ShowS
[GetMembersResponse] -> ShowS
GetMembersResponse -> String
(Int -> GetMembersResponse -> ShowS)
-> (GetMembersResponse -> String)
-> ([GetMembersResponse] -> ShowS)
-> Show GetMembersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetMembersResponse] -> ShowS
$cshowList :: [GetMembersResponse] -> ShowS
show :: GetMembersResponse -> String
$cshow :: GetMembersResponse -> String
showsPrec :: Int -> GetMembersResponse -> ShowS
$cshowsPrec :: Int -> GetMembersResponse -> ShowS
Prelude.Show, (forall x. GetMembersResponse -> Rep GetMembersResponse x)
-> (forall x. Rep GetMembersResponse x -> GetMembersResponse)
-> Generic GetMembersResponse
forall x. Rep GetMembersResponse x -> GetMembersResponse
forall x. GetMembersResponse -> Rep GetMembersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetMembersResponse x -> GetMembersResponse
$cfrom :: forall x. GetMembersResponse -> Rep GetMembersResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetMembersResponse' 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:
--
-- 'memberDetails', 'getMembersResponse_memberDetails' - The member account details that Detective is returning in response to
-- the request.
--
-- 'unprocessedAccounts', 'getMembersResponse_unprocessedAccounts' - The requested member accounts for which Detective was unable to return
-- member details.
--
-- For each account, provides the reason why the request could not be
-- processed.
--
-- 'httpStatus', 'getMembersResponse_httpStatus' - The response's http status code.
newGetMembersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetMembersResponse
newGetMembersResponse :: Int -> GetMembersResponse
newGetMembersResponse Int
pHttpStatus_ =
  GetMembersResponse' :: Maybe [MemberDetail]
-> Maybe [UnprocessedAccount] -> Int -> GetMembersResponse
GetMembersResponse'
    { $sel:memberDetails:GetMembersResponse' :: Maybe [MemberDetail]
memberDetails =
        Maybe [MemberDetail]
forall a. Maybe a
Prelude.Nothing,
      $sel:unprocessedAccounts:GetMembersResponse' :: Maybe [UnprocessedAccount]
unprocessedAccounts = Maybe [UnprocessedAccount]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetMembersResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The member account details that Detective is returning in response to
-- the request.
getMembersResponse_memberDetails :: Lens.Lens' GetMembersResponse (Prelude.Maybe [MemberDetail])
getMembersResponse_memberDetails :: (Maybe [MemberDetail] -> f (Maybe [MemberDetail]))
-> GetMembersResponse -> f GetMembersResponse
getMembersResponse_memberDetails = (GetMembersResponse -> Maybe [MemberDetail])
-> (GetMembersResponse
    -> Maybe [MemberDetail] -> GetMembersResponse)
-> Lens
     GetMembersResponse
     GetMembersResponse
     (Maybe [MemberDetail])
     (Maybe [MemberDetail])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMembersResponse' {Maybe [MemberDetail]
memberDetails :: Maybe [MemberDetail]
$sel:memberDetails:GetMembersResponse' :: GetMembersResponse -> Maybe [MemberDetail]
memberDetails} -> Maybe [MemberDetail]
memberDetails) (\s :: GetMembersResponse
s@GetMembersResponse' {} Maybe [MemberDetail]
a -> GetMembersResponse
s {$sel:memberDetails:GetMembersResponse' :: Maybe [MemberDetail]
memberDetails = Maybe [MemberDetail]
a} :: GetMembersResponse) ((Maybe [MemberDetail] -> f (Maybe [MemberDetail]))
 -> GetMembersResponse -> f GetMembersResponse)
-> ((Maybe [MemberDetail] -> f (Maybe [MemberDetail]))
    -> Maybe [MemberDetail] -> f (Maybe [MemberDetail]))
-> (Maybe [MemberDetail] -> f (Maybe [MemberDetail]))
-> GetMembersResponse
-> f GetMembersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [MemberDetail] [MemberDetail] [MemberDetail] [MemberDetail]
-> Iso
     (Maybe [MemberDetail])
     (Maybe [MemberDetail])
     (Maybe [MemberDetail])
     (Maybe [MemberDetail])
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 [MemberDetail] [MemberDetail] [MemberDetail] [MemberDetail]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The requested member accounts for which Detective was unable to return
-- member details.
--
-- For each account, provides the reason why the request could not be
-- processed.
getMembersResponse_unprocessedAccounts :: Lens.Lens' GetMembersResponse (Prelude.Maybe [UnprocessedAccount])
getMembersResponse_unprocessedAccounts :: (Maybe [UnprocessedAccount] -> f (Maybe [UnprocessedAccount]))
-> GetMembersResponse -> f GetMembersResponse
getMembersResponse_unprocessedAccounts = (GetMembersResponse -> Maybe [UnprocessedAccount])
-> (GetMembersResponse
    -> Maybe [UnprocessedAccount] -> GetMembersResponse)
-> Lens
     GetMembersResponse
     GetMembersResponse
     (Maybe [UnprocessedAccount])
     (Maybe [UnprocessedAccount])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMembersResponse' {Maybe [UnprocessedAccount]
unprocessedAccounts :: Maybe [UnprocessedAccount]
$sel:unprocessedAccounts:GetMembersResponse' :: GetMembersResponse -> Maybe [UnprocessedAccount]
unprocessedAccounts} -> Maybe [UnprocessedAccount]
unprocessedAccounts) (\s :: GetMembersResponse
s@GetMembersResponse' {} Maybe [UnprocessedAccount]
a -> GetMembersResponse
s {$sel:unprocessedAccounts:GetMembersResponse' :: Maybe [UnprocessedAccount]
unprocessedAccounts = Maybe [UnprocessedAccount]
a} :: GetMembersResponse) ((Maybe [UnprocessedAccount] -> f (Maybe [UnprocessedAccount]))
 -> GetMembersResponse -> f GetMembersResponse)
-> ((Maybe [UnprocessedAccount] -> f (Maybe [UnprocessedAccount]))
    -> Maybe [UnprocessedAccount] -> f (Maybe [UnprocessedAccount]))
-> (Maybe [UnprocessedAccount] -> f (Maybe [UnprocessedAccount]))
-> GetMembersResponse
-> f GetMembersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [UnprocessedAccount]
  [UnprocessedAccount]
  [UnprocessedAccount]
  [UnprocessedAccount]
-> Iso
     (Maybe [UnprocessedAccount])
     (Maybe [UnprocessedAccount])
     (Maybe [UnprocessedAccount])
     (Maybe [UnprocessedAccount])
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
  [UnprocessedAccount]
  [UnprocessedAccount]
  [UnprocessedAccount]
  [UnprocessedAccount]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData GetMembersResponse