{-# 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 #-}
module Amazonka.MacieV2.ListOrganizationAdminAccounts
(
ListOrganizationAdminAccounts (..),
newListOrganizationAdminAccounts,
listOrganizationAdminAccounts_nextToken,
listOrganizationAdminAccounts_maxResults,
ListOrganizationAdminAccountsResponse (..),
newListOrganizationAdminAccountsResponse,
listOrganizationAdminAccountsResponse_adminAccounts,
listOrganizationAdminAccountsResponse_nextToken,
listOrganizationAdminAccountsResponse_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
data ListOrganizationAdminAccounts = ListOrganizationAdminAccounts'
{
ListOrganizationAdminAccounts -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListOrganizationAdminAccounts -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (ListOrganizationAdminAccounts
-> ListOrganizationAdminAccounts -> Bool
(ListOrganizationAdminAccounts
-> ListOrganizationAdminAccounts -> Bool)
-> (ListOrganizationAdminAccounts
-> ListOrganizationAdminAccounts -> Bool)
-> Eq ListOrganizationAdminAccounts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListOrganizationAdminAccounts
-> ListOrganizationAdminAccounts -> Bool
$c/= :: ListOrganizationAdminAccounts
-> ListOrganizationAdminAccounts -> Bool
== :: ListOrganizationAdminAccounts
-> ListOrganizationAdminAccounts -> Bool
$c== :: ListOrganizationAdminAccounts
-> ListOrganizationAdminAccounts -> Bool
Prelude.Eq, ReadPrec [ListOrganizationAdminAccounts]
ReadPrec ListOrganizationAdminAccounts
Int -> ReadS ListOrganizationAdminAccounts
ReadS [ListOrganizationAdminAccounts]
(Int -> ReadS ListOrganizationAdminAccounts)
-> ReadS [ListOrganizationAdminAccounts]
-> ReadPrec ListOrganizationAdminAccounts
-> ReadPrec [ListOrganizationAdminAccounts]
-> Read ListOrganizationAdminAccounts
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListOrganizationAdminAccounts]
$creadListPrec :: ReadPrec [ListOrganizationAdminAccounts]
readPrec :: ReadPrec ListOrganizationAdminAccounts
$creadPrec :: ReadPrec ListOrganizationAdminAccounts
readList :: ReadS [ListOrganizationAdminAccounts]
$creadList :: ReadS [ListOrganizationAdminAccounts]
readsPrec :: Int -> ReadS ListOrganizationAdminAccounts
$creadsPrec :: Int -> ReadS ListOrganizationAdminAccounts
Prelude.Read, Int -> ListOrganizationAdminAccounts -> ShowS
[ListOrganizationAdminAccounts] -> ShowS
ListOrganizationAdminAccounts -> String
(Int -> ListOrganizationAdminAccounts -> ShowS)
-> (ListOrganizationAdminAccounts -> String)
-> ([ListOrganizationAdminAccounts] -> ShowS)
-> Show ListOrganizationAdminAccounts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListOrganizationAdminAccounts] -> ShowS
$cshowList :: [ListOrganizationAdminAccounts] -> ShowS
show :: ListOrganizationAdminAccounts -> String
$cshow :: ListOrganizationAdminAccounts -> String
showsPrec :: Int -> ListOrganizationAdminAccounts -> ShowS
$cshowsPrec :: Int -> ListOrganizationAdminAccounts -> ShowS
Prelude.Show, (forall x.
ListOrganizationAdminAccounts
-> Rep ListOrganizationAdminAccounts x)
-> (forall x.
Rep ListOrganizationAdminAccounts x
-> ListOrganizationAdminAccounts)
-> Generic ListOrganizationAdminAccounts
forall x.
Rep ListOrganizationAdminAccounts x
-> ListOrganizationAdminAccounts
forall x.
ListOrganizationAdminAccounts
-> Rep ListOrganizationAdminAccounts x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListOrganizationAdminAccounts x
-> ListOrganizationAdminAccounts
$cfrom :: forall x.
ListOrganizationAdminAccounts
-> Rep ListOrganizationAdminAccounts x
Prelude.Generic)
newListOrganizationAdminAccounts ::
ListOrganizationAdminAccounts
newListOrganizationAdminAccounts :: ListOrganizationAdminAccounts
newListOrganizationAdminAccounts =
ListOrganizationAdminAccounts' :: Maybe Text -> Maybe Natural -> ListOrganizationAdminAccounts
ListOrganizationAdminAccounts'
{ $sel:nextToken:ListOrganizationAdminAccounts' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListOrganizationAdminAccounts' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
listOrganizationAdminAccounts_nextToken :: Lens.Lens' ListOrganizationAdminAccounts (Prelude.Maybe Prelude.Text)
listOrganizationAdminAccounts_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListOrganizationAdminAccounts -> f ListOrganizationAdminAccounts
listOrganizationAdminAccounts_nextToken = (ListOrganizationAdminAccounts -> Maybe Text)
-> (ListOrganizationAdminAccounts
-> Maybe Text -> ListOrganizationAdminAccounts)
-> Lens
ListOrganizationAdminAccounts
ListOrganizationAdminAccounts
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOrganizationAdminAccounts' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListOrganizationAdminAccounts' :: ListOrganizationAdminAccounts -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListOrganizationAdminAccounts
s@ListOrganizationAdminAccounts' {} Maybe Text
a -> ListOrganizationAdminAccounts
s {$sel:nextToken:ListOrganizationAdminAccounts' :: Maybe Text
nextToken = Maybe Text
a} :: ListOrganizationAdminAccounts)
listOrganizationAdminAccounts_maxResults :: Lens.Lens' ListOrganizationAdminAccounts (Prelude.Maybe Prelude.Natural)
listOrganizationAdminAccounts_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListOrganizationAdminAccounts -> f ListOrganizationAdminAccounts
listOrganizationAdminAccounts_maxResults = (ListOrganizationAdminAccounts -> Maybe Natural)
-> (ListOrganizationAdminAccounts
-> Maybe Natural -> ListOrganizationAdminAccounts)
-> Lens
ListOrganizationAdminAccounts
ListOrganizationAdminAccounts
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOrganizationAdminAccounts' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListOrganizationAdminAccounts' :: ListOrganizationAdminAccounts -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListOrganizationAdminAccounts
s@ListOrganizationAdminAccounts' {} Maybe Natural
a -> ListOrganizationAdminAccounts
s {$sel:maxResults:ListOrganizationAdminAccounts' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListOrganizationAdminAccounts)
instance Core.AWSPager ListOrganizationAdminAccounts where
page :: ListOrganizationAdminAccounts
-> AWSResponse ListOrganizationAdminAccounts
-> Maybe ListOrganizationAdminAccounts
page ListOrganizationAdminAccounts
rq AWSResponse ListOrganizationAdminAccounts
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListOrganizationAdminAccounts
ListOrganizationAdminAccountsResponse
rs
ListOrganizationAdminAccountsResponse
-> Getting (First Text) ListOrganizationAdminAccountsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListOrganizationAdminAccountsResponse
-> Const (First Text) ListOrganizationAdminAccountsResponse
Lens' ListOrganizationAdminAccountsResponse (Maybe Text)
listOrganizationAdminAccountsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListOrganizationAdminAccountsResponse
-> Const (First Text) ListOrganizationAdminAccountsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListOrganizationAdminAccountsResponse 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 ListOrganizationAdminAccounts
forall a. Maybe a
Prelude.Nothing
| Maybe [AdminAccount] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListOrganizationAdminAccounts
ListOrganizationAdminAccountsResponse
rs
ListOrganizationAdminAccountsResponse
-> Getting
(First [AdminAccount])
ListOrganizationAdminAccountsResponse
[AdminAccount]
-> Maybe [AdminAccount]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [AdminAccount]
-> Const (First [AdminAccount]) (Maybe [AdminAccount]))
-> ListOrganizationAdminAccountsResponse
-> Const
(First [AdminAccount]) ListOrganizationAdminAccountsResponse
Lens' ListOrganizationAdminAccountsResponse (Maybe [AdminAccount])
listOrganizationAdminAccountsResponse_adminAccounts
((Maybe [AdminAccount]
-> Const (First [AdminAccount]) (Maybe [AdminAccount]))
-> ListOrganizationAdminAccountsResponse
-> Const
(First [AdminAccount]) ListOrganizationAdminAccountsResponse)
-> (([AdminAccount] -> Const (First [AdminAccount]) [AdminAccount])
-> Maybe [AdminAccount]
-> Const (First [AdminAccount]) (Maybe [AdminAccount]))
-> Getting
(First [AdminAccount])
ListOrganizationAdminAccountsResponse
[AdminAccount]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AdminAccount] -> Const (First [AdminAccount]) [AdminAccount])
-> Maybe [AdminAccount]
-> Const (First [AdminAccount]) (Maybe [AdminAccount])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListOrganizationAdminAccounts
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListOrganizationAdminAccounts
-> Maybe ListOrganizationAdminAccounts
forall a. a -> Maybe a
Prelude.Just (ListOrganizationAdminAccounts
-> Maybe ListOrganizationAdminAccounts)
-> ListOrganizationAdminAccounts
-> Maybe ListOrganizationAdminAccounts
forall a b. (a -> b) -> a -> b
Prelude.$
ListOrganizationAdminAccounts
rq
ListOrganizationAdminAccounts
-> (ListOrganizationAdminAccounts -> ListOrganizationAdminAccounts)
-> ListOrganizationAdminAccounts
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListOrganizationAdminAccounts
-> Identity ListOrganizationAdminAccounts
Lens
ListOrganizationAdminAccounts
ListOrganizationAdminAccounts
(Maybe Text)
(Maybe Text)
listOrganizationAdminAccounts_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListOrganizationAdminAccounts
-> Identity ListOrganizationAdminAccounts)
-> Maybe Text
-> ListOrganizationAdminAccounts
-> ListOrganizationAdminAccounts
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListOrganizationAdminAccounts
ListOrganizationAdminAccountsResponse
rs
ListOrganizationAdminAccountsResponse
-> Getting (First Text) ListOrganizationAdminAccountsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListOrganizationAdminAccountsResponse
-> Const (First Text) ListOrganizationAdminAccountsResponse
Lens' ListOrganizationAdminAccountsResponse (Maybe Text)
listOrganizationAdminAccountsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListOrganizationAdminAccountsResponse
-> Const (First Text) ListOrganizationAdminAccountsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListOrganizationAdminAccountsResponse 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
ListOrganizationAdminAccounts
where
type
AWSResponse ListOrganizationAdminAccounts =
ListOrganizationAdminAccountsResponse
request :: ListOrganizationAdminAccounts
-> Request ListOrganizationAdminAccounts
request = Service
-> ListOrganizationAdminAccounts
-> Request ListOrganizationAdminAccounts
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListOrganizationAdminAccounts
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListOrganizationAdminAccounts)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListOrganizationAdminAccounts))
-> Logger
-> Service
-> Proxy ListOrganizationAdminAccounts
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListOrganizationAdminAccounts)))
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 [AdminAccount]
-> Maybe Text -> Int -> ListOrganizationAdminAccountsResponse
ListOrganizationAdminAccountsResponse'
(Maybe [AdminAccount]
-> Maybe Text -> Int -> ListOrganizationAdminAccountsResponse)
-> Either String (Maybe [AdminAccount])
-> Either
String (Maybe Text -> Int -> ListOrganizationAdminAccountsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [AdminAccount]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"adminAccounts" Either String (Maybe (Maybe [AdminAccount]))
-> Maybe [AdminAccount] -> Either String (Maybe [AdminAccount])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AdminAccount]
forall a. Monoid a => a
Prelude.mempty)
Either
String (Maybe Text -> Int -> ListOrganizationAdminAccountsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListOrganizationAdminAccountsResponse)
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 -> ListOrganizationAdminAccountsResponse)
-> Either String Int
-> Either String ListOrganizationAdminAccountsResponse
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
ListOrganizationAdminAccounts
instance Prelude.NFData ListOrganizationAdminAccounts
instance Core.ToHeaders ListOrganizationAdminAccounts where
toHeaders :: ListOrganizationAdminAccounts -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListOrganizationAdminAccounts -> 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 ListOrganizationAdminAccounts where
toPath :: ListOrganizationAdminAccounts -> ByteString
toPath = ByteString -> ListOrganizationAdminAccounts -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/admin"
instance Core.ToQuery ListOrganizationAdminAccounts where
toQuery :: ListOrganizationAdminAccounts -> QueryString
toQuery ListOrganizationAdminAccounts' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListOrganizationAdminAccounts' :: ListOrganizationAdminAccounts -> Maybe Natural
$sel:nextToken:ListOrganizationAdminAccounts' :: ListOrganizationAdminAccounts -> 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
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
]
data ListOrganizationAdminAccountsResponse = ListOrganizationAdminAccountsResponse'
{
ListOrganizationAdminAccountsResponse -> Maybe [AdminAccount]
adminAccounts :: Prelude.Maybe [AdminAccount],
ListOrganizationAdminAccountsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListOrganizationAdminAccountsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListOrganizationAdminAccountsResponse
-> ListOrganizationAdminAccountsResponse -> Bool
(ListOrganizationAdminAccountsResponse
-> ListOrganizationAdminAccountsResponse -> Bool)
-> (ListOrganizationAdminAccountsResponse
-> ListOrganizationAdminAccountsResponse -> Bool)
-> Eq ListOrganizationAdminAccountsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListOrganizationAdminAccountsResponse
-> ListOrganizationAdminAccountsResponse -> Bool
$c/= :: ListOrganizationAdminAccountsResponse
-> ListOrganizationAdminAccountsResponse -> Bool
== :: ListOrganizationAdminAccountsResponse
-> ListOrganizationAdminAccountsResponse -> Bool
$c== :: ListOrganizationAdminAccountsResponse
-> ListOrganizationAdminAccountsResponse -> Bool
Prelude.Eq, ReadPrec [ListOrganizationAdminAccountsResponse]
ReadPrec ListOrganizationAdminAccountsResponse
Int -> ReadS ListOrganizationAdminAccountsResponse
ReadS [ListOrganizationAdminAccountsResponse]
(Int -> ReadS ListOrganizationAdminAccountsResponse)
-> ReadS [ListOrganizationAdminAccountsResponse]
-> ReadPrec ListOrganizationAdminAccountsResponse
-> ReadPrec [ListOrganizationAdminAccountsResponse]
-> Read ListOrganizationAdminAccountsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListOrganizationAdminAccountsResponse]
$creadListPrec :: ReadPrec [ListOrganizationAdminAccountsResponse]
readPrec :: ReadPrec ListOrganizationAdminAccountsResponse
$creadPrec :: ReadPrec ListOrganizationAdminAccountsResponse
readList :: ReadS [ListOrganizationAdminAccountsResponse]
$creadList :: ReadS [ListOrganizationAdminAccountsResponse]
readsPrec :: Int -> ReadS ListOrganizationAdminAccountsResponse
$creadsPrec :: Int -> ReadS ListOrganizationAdminAccountsResponse
Prelude.Read, Int -> ListOrganizationAdminAccountsResponse -> ShowS
[ListOrganizationAdminAccountsResponse] -> ShowS
ListOrganizationAdminAccountsResponse -> String
(Int -> ListOrganizationAdminAccountsResponse -> ShowS)
-> (ListOrganizationAdminAccountsResponse -> String)
-> ([ListOrganizationAdminAccountsResponse] -> ShowS)
-> Show ListOrganizationAdminAccountsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListOrganizationAdminAccountsResponse] -> ShowS
$cshowList :: [ListOrganizationAdminAccountsResponse] -> ShowS
show :: ListOrganizationAdminAccountsResponse -> String
$cshow :: ListOrganizationAdminAccountsResponse -> String
showsPrec :: Int -> ListOrganizationAdminAccountsResponse -> ShowS
$cshowsPrec :: Int -> ListOrganizationAdminAccountsResponse -> ShowS
Prelude.Show, (forall x.
ListOrganizationAdminAccountsResponse
-> Rep ListOrganizationAdminAccountsResponse x)
-> (forall x.
Rep ListOrganizationAdminAccountsResponse x
-> ListOrganizationAdminAccountsResponse)
-> Generic ListOrganizationAdminAccountsResponse
forall x.
Rep ListOrganizationAdminAccountsResponse x
-> ListOrganizationAdminAccountsResponse
forall x.
ListOrganizationAdminAccountsResponse
-> Rep ListOrganizationAdminAccountsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListOrganizationAdminAccountsResponse x
-> ListOrganizationAdminAccountsResponse
$cfrom :: forall x.
ListOrganizationAdminAccountsResponse
-> Rep ListOrganizationAdminAccountsResponse x
Prelude.Generic)
newListOrganizationAdminAccountsResponse ::
Prelude.Int ->
ListOrganizationAdminAccountsResponse
newListOrganizationAdminAccountsResponse :: Int -> ListOrganizationAdminAccountsResponse
newListOrganizationAdminAccountsResponse Int
pHttpStatus_ =
ListOrganizationAdminAccountsResponse' :: Maybe [AdminAccount]
-> Maybe Text -> Int -> ListOrganizationAdminAccountsResponse
ListOrganizationAdminAccountsResponse'
{ $sel:adminAccounts:ListOrganizationAdminAccountsResponse' :: Maybe [AdminAccount]
adminAccounts =
Maybe [AdminAccount]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListOrganizationAdminAccountsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListOrganizationAdminAccountsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listOrganizationAdminAccountsResponse_adminAccounts :: Lens.Lens' ListOrganizationAdminAccountsResponse (Prelude.Maybe [AdminAccount])
listOrganizationAdminAccountsResponse_adminAccounts :: (Maybe [AdminAccount] -> f (Maybe [AdminAccount]))
-> ListOrganizationAdminAccountsResponse
-> f ListOrganizationAdminAccountsResponse
listOrganizationAdminAccountsResponse_adminAccounts = (ListOrganizationAdminAccountsResponse -> Maybe [AdminAccount])
-> (ListOrganizationAdminAccountsResponse
-> Maybe [AdminAccount] -> ListOrganizationAdminAccountsResponse)
-> Lens'
ListOrganizationAdminAccountsResponse (Maybe [AdminAccount])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOrganizationAdminAccountsResponse' {Maybe [AdminAccount]
adminAccounts :: Maybe [AdminAccount]
$sel:adminAccounts:ListOrganizationAdminAccountsResponse' :: ListOrganizationAdminAccountsResponse -> Maybe [AdminAccount]
adminAccounts} -> Maybe [AdminAccount]
adminAccounts) (\s :: ListOrganizationAdminAccountsResponse
s@ListOrganizationAdminAccountsResponse' {} Maybe [AdminAccount]
a -> ListOrganizationAdminAccountsResponse
s {$sel:adminAccounts:ListOrganizationAdminAccountsResponse' :: Maybe [AdminAccount]
adminAccounts = Maybe [AdminAccount]
a} :: ListOrganizationAdminAccountsResponse) ((Maybe [AdminAccount] -> f (Maybe [AdminAccount]))
-> ListOrganizationAdminAccountsResponse
-> f ListOrganizationAdminAccountsResponse)
-> ((Maybe [AdminAccount] -> f (Maybe [AdminAccount]))
-> Maybe [AdminAccount] -> f (Maybe [AdminAccount]))
-> (Maybe [AdminAccount] -> f (Maybe [AdminAccount]))
-> ListOrganizationAdminAccountsResponse
-> f ListOrganizationAdminAccountsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [AdminAccount] [AdminAccount] [AdminAccount] [AdminAccount]
-> Iso
(Maybe [AdminAccount])
(Maybe [AdminAccount])
(Maybe [AdminAccount])
(Maybe [AdminAccount])
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 [AdminAccount] [AdminAccount] [AdminAccount] [AdminAccount]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listOrganizationAdminAccountsResponse_nextToken :: Lens.Lens' ListOrganizationAdminAccountsResponse (Prelude.Maybe Prelude.Text)
listOrganizationAdminAccountsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListOrganizationAdminAccountsResponse
-> f ListOrganizationAdminAccountsResponse
listOrganizationAdminAccountsResponse_nextToken = (ListOrganizationAdminAccountsResponse -> Maybe Text)
-> (ListOrganizationAdminAccountsResponse
-> Maybe Text -> ListOrganizationAdminAccountsResponse)
-> Lens' ListOrganizationAdminAccountsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOrganizationAdminAccountsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListOrganizationAdminAccountsResponse' :: ListOrganizationAdminAccountsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListOrganizationAdminAccountsResponse
s@ListOrganizationAdminAccountsResponse' {} Maybe Text
a -> ListOrganizationAdminAccountsResponse
s {$sel:nextToken:ListOrganizationAdminAccountsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListOrganizationAdminAccountsResponse)
listOrganizationAdminAccountsResponse_httpStatus :: Lens.Lens' ListOrganizationAdminAccountsResponse Prelude.Int
listOrganizationAdminAccountsResponse_httpStatus :: (Int -> f Int)
-> ListOrganizationAdminAccountsResponse
-> f ListOrganizationAdminAccountsResponse
listOrganizationAdminAccountsResponse_httpStatus = (ListOrganizationAdminAccountsResponse -> Int)
-> (ListOrganizationAdminAccountsResponse
-> Int -> ListOrganizationAdminAccountsResponse)
-> Lens
ListOrganizationAdminAccountsResponse
ListOrganizationAdminAccountsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOrganizationAdminAccountsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListOrganizationAdminAccountsResponse' :: ListOrganizationAdminAccountsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListOrganizationAdminAccountsResponse
s@ListOrganizationAdminAccountsResponse' {} Int
a -> ListOrganizationAdminAccountsResponse
s {$sel:httpStatus:ListOrganizationAdminAccountsResponse' :: Int
httpStatus = Int
a} :: ListOrganizationAdminAccountsResponse)
instance
Prelude.NFData
ListOrganizationAdminAccountsResponse