{-# 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.IAM.ListRoles
(
ListRoles (..),
newListRoles,
listRoles_pathPrefix,
listRoles_marker,
listRoles_maxItems,
ListRolesResponse (..),
newListRolesResponse,
listRolesResponse_marker,
listRolesResponse_isTruncated,
listRolesResponse_httpStatus,
listRolesResponse_roles,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IAM.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
data ListRoles = ListRoles'
{
ListRoles -> Maybe Text
pathPrefix :: Prelude.Maybe Prelude.Text,
ListRoles -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
ListRoles -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural
}
deriving (ListRoles -> ListRoles -> Bool
(ListRoles -> ListRoles -> Bool)
-> (ListRoles -> ListRoles -> Bool) -> Eq ListRoles
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRoles -> ListRoles -> Bool
$c/= :: ListRoles -> ListRoles -> Bool
== :: ListRoles -> ListRoles -> Bool
$c== :: ListRoles -> ListRoles -> Bool
Prelude.Eq, ReadPrec [ListRoles]
ReadPrec ListRoles
Int -> ReadS ListRoles
ReadS [ListRoles]
(Int -> ReadS ListRoles)
-> ReadS [ListRoles]
-> ReadPrec ListRoles
-> ReadPrec [ListRoles]
-> Read ListRoles
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRoles]
$creadListPrec :: ReadPrec [ListRoles]
readPrec :: ReadPrec ListRoles
$creadPrec :: ReadPrec ListRoles
readList :: ReadS [ListRoles]
$creadList :: ReadS [ListRoles]
readsPrec :: Int -> ReadS ListRoles
$creadsPrec :: Int -> ReadS ListRoles
Prelude.Read, Int -> ListRoles -> ShowS
[ListRoles] -> ShowS
ListRoles -> String
(Int -> ListRoles -> ShowS)
-> (ListRoles -> String)
-> ([ListRoles] -> ShowS)
-> Show ListRoles
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRoles] -> ShowS
$cshowList :: [ListRoles] -> ShowS
show :: ListRoles -> String
$cshow :: ListRoles -> String
showsPrec :: Int -> ListRoles -> ShowS
$cshowsPrec :: Int -> ListRoles -> ShowS
Prelude.Show, (forall x. ListRoles -> Rep ListRoles x)
-> (forall x. Rep ListRoles x -> ListRoles) -> Generic ListRoles
forall x. Rep ListRoles x -> ListRoles
forall x. ListRoles -> Rep ListRoles x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListRoles x -> ListRoles
$cfrom :: forall x. ListRoles -> Rep ListRoles x
Prelude.Generic)
newListRoles ::
ListRoles
newListRoles :: ListRoles
newListRoles =
ListRoles' :: Maybe Text -> Maybe Text -> Maybe Natural -> ListRoles
ListRoles'
{ $sel:pathPrefix:ListRoles' :: Maybe Text
pathPrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:marker:ListRoles' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxItems:ListRoles' :: Maybe Natural
maxItems = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
listRoles_pathPrefix :: Lens.Lens' ListRoles (Prelude.Maybe Prelude.Text)
listRoles_pathPrefix :: (Maybe Text -> f (Maybe Text)) -> ListRoles -> f ListRoles
listRoles_pathPrefix = (ListRoles -> Maybe Text)
-> (ListRoles -> Maybe Text -> ListRoles)
-> Lens ListRoles ListRoles (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRoles' {Maybe Text
pathPrefix :: Maybe Text
$sel:pathPrefix:ListRoles' :: ListRoles -> Maybe Text
pathPrefix} -> Maybe Text
pathPrefix) (\s :: ListRoles
s@ListRoles' {} Maybe Text
a -> ListRoles
s {$sel:pathPrefix:ListRoles' :: Maybe Text
pathPrefix = Maybe Text
a} :: ListRoles)
listRoles_marker :: Lens.Lens' ListRoles (Prelude.Maybe Prelude.Text)
listRoles_marker :: (Maybe Text -> f (Maybe Text)) -> ListRoles -> f ListRoles
listRoles_marker = (ListRoles -> Maybe Text)
-> (ListRoles -> Maybe Text -> ListRoles)
-> Lens ListRoles ListRoles (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRoles' {Maybe Text
marker :: Maybe Text
$sel:marker:ListRoles' :: ListRoles -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListRoles
s@ListRoles' {} Maybe Text
a -> ListRoles
s {$sel:marker:ListRoles' :: Maybe Text
marker = Maybe Text
a} :: ListRoles)
listRoles_maxItems :: Lens.Lens' ListRoles (Prelude.Maybe Prelude.Natural)
listRoles_maxItems :: (Maybe Natural -> f (Maybe Natural)) -> ListRoles -> f ListRoles
listRoles_maxItems = (ListRoles -> Maybe Natural)
-> (ListRoles -> Maybe Natural -> ListRoles)
-> Lens ListRoles ListRoles (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRoles' {Maybe Natural
maxItems :: Maybe Natural
$sel:maxItems:ListRoles' :: ListRoles -> Maybe Natural
maxItems} -> Maybe Natural
maxItems) (\s :: ListRoles
s@ListRoles' {} Maybe Natural
a -> ListRoles
s {$sel:maxItems:ListRoles' :: Maybe Natural
maxItems = Maybe Natural
a} :: ListRoles)
instance Core.AWSPager ListRoles where
page :: ListRoles -> AWSResponse ListRoles -> Maybe ListRoles
page ListRoles
rq AWSResponse ListRoles
rs
| Maybe Bool -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListRoles
ListRolesResponse
rs
ListRolesResponse
-> Getting (First Bool) ListRolesResponse Bool -> Maybe Bool
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Bool -> Const (First Bool) (Maybe Bool))
-> ListRolesResponse -> Const (First Bool) ListRolesResponse
Lens' ListRolesResponse (Maybe Bool)
listRolesResponse_isTruncated ((Maybe Bool -> Const (First Bool) (Maybe Bool))
-> ListRolesResponse -> Const (First Bool) ListRolesResponse)
-> ((Bool -> Const (First Bool) Bool)
-> Maybe Bool -> Const (First Bool) (Maybe Bool))
-> Getting (First Bool) ListRolesResponse Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Bool -> Const (First Bool) Bool)
-> Maybe Bool -> Const (First Bool) (Maybe Bool)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListRoles
forall a. Maybe a
Prelude.Nothing
| Maybe Text -> Bool
forall a. Maybe a -> Bool
Prelude.isNothing
( AWSResponse ListRoles
ListRolesResponse
rs
ListRolesResponse
-> Getting (First Text) ListRolesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListRolesResponse -> Const (First Text) ListRolesResponse
Lens' ListRolesResponse (Maybe Text)
listRolesResponse_marker ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListRolesResponse -> Const (First Text) ListRolesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListRolesResponse 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 ListRoles
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListRoles -> Maybe ListRoles
forall a. a -> Maybe a
Prelude.Just (ListRoles -> Maybe ListRoles) -> ListRoles -> Maybe ListRoles
forall a b. (a -> b) -> a -> b
Prelude.$
ListRoles
rq
ListRoles -> (ListRoles -> ListRoles) -> ListRoles
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListRoles -> Identity ListRoles
Lens ListRoles ListRoles (Maybe Text) (Maybe Text)
listRoles_marker
((Maybe Text -> Identity (Maybe Text))
-> ListRoles -> Identity ListRoles)
-> Maybe Text -> ListRoles -> ListRoles
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListRoles
ListRolesResponse
rs
ListRolesResponse
-> Getting (First Text) ListRolesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListRolesResponse -> Const (First Text) ListRolesResponse
Lens' ListRolesResponse (Maybe Text)
listRolesResponse_marker ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListRolesResponse -> Const (First Text) ListRolesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListRolesResponse 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 ListRoles where
type AWSResponse ListRoles = ListRolesResponse
request :: ListRoles -> Request ListRoles
request = Service -> ListRoles -> Request ListRoles
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy ListRoles
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListRoles)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse ListRoles))
-> Logger
-> Service
-> Proxy ListRoles
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListRoles)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"ListRolesResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Text -> Maybe Bool -> Int -> [Role] -> ListRolesResponse
ListRolesResponse'
(Maybe Text -> Maybe Bool -> Int -> [Role] -> ListRolesResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Bool -> Int -> [Role] -> ListRolesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Marker")
Either String (Maybe Bool -> Int -> [Role] -> ListRolesResponse)
-> Either String (Maybe Bool)
-> Either String (Int -> [Role] -> ListRolesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"IsTruncated")
Either String (Int -> [Role] -> ListRolesResponse)
-> Either String Int -> Either String ([Role] -> ListRolesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
Either String ([Role] -> ListRolesResponse)
-> Either String [Role] -> Either String ListRolesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Roles" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String [Role]) -> Either String [Role]
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= Text -> [Node] -> Either String [Role]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member"
)
)
instance Prelude.Hashable ListRoles
instance Prelude.NFData ListRoles
instance Core.ToHeaders ListRoles where
toHeaders :: ListRoles -> ResponseHeaders
toHeaders = ResponseHeaders -> ListRoles -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ListRoles where
toPath :: ListRoles -> ByteString
toPath = ByteString -> ListRoles -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListRoles where
toQuery :: ListRoles -> QueryString
toQuery ListRoles' {Maybe Natural
Maybe Text
maxItems :: Maybe Natural
marker :: Maybe Text
pathPrefix :: Maybe Text
$sel:maxItems:ListRoles' :: ListRoles -> Maybe Natural
$sel:marker:ListRoles' :: ListRoles -> Maybe Text
$sel:pathPrefix:ListRoles' :: ListRoles -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ListRoles" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
ByteString
"PathPrefix" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
pathPrefix,
ByteString
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
ByteString
"MaxItems" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxItems
]
data ListRolesResponse = ListRolesResponse'
{
ListRolesResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
ListRolesResponse -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
ListRolesResponse -> Int
httpStatus :: Prelude.Int,
ListRolesResponse -> [Role]
roles :: [Role]
}
deriving (ListRolesResponse -> ListRolesResponse -> Bool
(ListRolesResponse -> ListRolesResponse -> Bool)
-> (ListRolesResponse -> ListRolesResponse -> Bool)
-> Eq ListRolesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRolesResponse -> ListRolesResponse -> Bool
$c/= :: ListRolesResponse -> ListRolesResponse -> Bool
== :: ListRolesResponse -> ListRolesResponse -> Bool
$c== :: ListRolesResponse -> ListRolesResponse -> Bool
Prelude.Eq, ReadPrec [ListRolesResponse]
ReadPrec ListRolesResponse
Int -> ReadS ListRolesResponse
ReadS [ListRolesResponse]
(Int -> ReadS ListRolesResponse)
-> ReadS [ListRolesResponse]
-> ReadPrec ListRolesResponse
-> ReadPrec [ListRolesResponse]
-> Read ListRolesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRolesResponse]
$creadListPrec :: ReadPrec [ListRolesResponse]
readPrec :: ReadPrec ListRolesResponse
$creadPrec :: ReadPrec ListRolesResponse
readList :: ReadS [ListRolesResponse]
$creadList :: ReadS [ListRolesResponse]
readsPrec :: Int -> ReadS ListRolesResponse
$creadsPrec :: Int -> ReadS ListRolesResponse
Prelude.Read, Int -> ListRolesResponse -> ShowS
[ListRolesResponse] -> ShowS
ListRolesResponse -> String
(Int -> ListRolesResponse -> ShowS)
-> (ListRolesResponse -> String)
-> ([ListRolesResponse] -> ShowS)
-> Show ListRolesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRolesResponse] -> ShowS
$cshowList :: [ListRolesResponse] -> ShowS
show :: ListRolesResponse -> String
$cshow :: ListRolesResponse -> String
showsPrec :: Int -> ListRolesResponse -> ShowS
$cshowsPrec :: Int -> ListRolesResponse -> ShowS
Prelude.Show, (forall x. ListRolesResponse -> Rep ListRolesResponse x)
-> (forall x. Rep ListRolesResponse x -> ListRolesResponse)
-> Generic ListRolesResponse
forall x. Rep ListRolesResponse x -> ListRolesResponse
forall x. ListRolesResponse -> Rep ListRolesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListRolesResponse x -> ListRolesResponse
$cfrom :: forall x. ListRolesResponse -> Rep ListRolesResponse x
Prelude.Generic)
newListRolesResponse ::
Prelude.Int ->
ListRolesResponse
newListRolesResponse :: Int -> ListRolesResponse
newListRolesResponse Int
pHttpStatus_ =
ListRolesResponse' :: Maybe Text -> Maybe Bool -> Int -> [Role] -> ListRolesResponse
ListRolesResponse'
{ $sel:marker:ListRolesResponse' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isTruncated:ListRolesResponse' :: Maybe Bool
isTruncated = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListRolesResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:roles:ListRolesResponse' :: [Role]
roles = [Role]
forall a. Monoid a => a
Prelude.mempty
}
listRolesResponse_marker :: Lens.Lens' ListRolesResponse (Prelude.Maybe Prelude.Text)
listRolesResponse_marker :: (Maybe Text -> f (Maybe Text))
-> ListRolesResponse -> f ListRolesResponse
listRolesResponse_marker = (ListRolesResponse -> Maybe Text)
-> (ListRolesResponse -> Maybe Text -> ListRolesResponse)
-> Lens' ListRolesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRolesResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:ListRolesResponse' :: ListRolesResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListRolesResponse
s@ListRolesResponse' {} Maybe Text
a -> ListRolesResponse
s {$sel:marker:ListRolesResponse' :: Maybe Text
marker = Maybe Text
a} :: ListRolesResponse)
listRolesResponse_isTruncated :: Lens.Lens' ListRolesResponse (Prelude.Maybe Prelude.Bool)
listRolesResponse_isTruncated :: (Maybe Bool -> f (Maybe Bool))
-> ListRolesResponse -> f ListRolesResponse
listRolesResponse_isTruncated = (ListRolesResponse -> Maybe Bool)
-> (ListRolesResponse -> Maybe Bool -> ListRolesResponse)
-> Lens' ListRolesResponse (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRolesResponse' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ListRolesResponse' :: ListRolesResponse -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ListRolesResponse
s@ListRolesResponse' {} Maybe Bool
a -> ListRolesResponse
s {$sel:isTruncated:ListRolesResponse' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ListRolesResponse)
listRolesResponse_httpStatus :: Lens.Lens' ListRolesResponse Prelude.Int
listRolesResponse_httpStatus :: (Int -> f Int) -> ListRolesResponse -> f ListRolesResponse
listRolesResponse_httpStatus = (ListRolesResponse -> Int)
-> (ListRolesResponse -> Int -> ListRolesResponse)
-> Lens ListRolesResponse ListRolesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRolesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListRolesResponse' :: ListRolesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListRolesResponse
s@ListRolesResponse' {} Int
a -> ListRolesResponse
s {$sel:httpStatus:ListRolesResponse' :: Int
httpStatus = Int
a} :: ListRolesResponse)
listRolesResponse_roles :: Lens.Lens' ListRolesResponse [Role]
listRolesResponse_roles :: ([Role] -> f [Role]) -> ListRolesResponse -> f ListRolesResponse
listRolesResponse_roles = (ListRolesResponse -> [Role])
-> (ListRolesResponse -> [Role] -> ListRolesResponse)
-> Lens ListRolesResponse ListRolesResponse [Role] [Role]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRolesResponse' {[Role]
roles :: [Role]
$sel:roles:ListRolesResponse' :: ListRolesResponse -> [Role]
roles} -> [Role]
roles) (\s :: ListRolesResponse
s@ListRolesResponse' {} [Role]
a -> ListRolesResponse
s {$sel:roles:ListRolesResponse' :: [Role]
roles = [Role]
a} :: ListRolesResponse) (([Role] -> f [Role]) -> ListRolesResponse -> f ListRolesResponse)
-> (([Role] -> f [Role]) -> [Role] -> f [Role])
-> ([Role] -> f [Role])
-> ListRolesResponse
-> f ListRolesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Role] -> f [Role]) -> [Role] -> f [Role]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.NFData ListRolesResponse