{-# 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.ListPolicies
(
ListPolicies (..),
newListPolicies,
listPolicies_pathPrefix,
listPolicies_onlyAttached,
listPolicies_marker,
listPolicies_scope,
listPolicies_maxItems,
listPolicies_policyUsageFilter,
ListPoliciesResponse (..),
newListPoliciesResponse,
listPoliciesResponse_marker,
listPoliciesResponse_isTruncated,
listPoliciesResponse_policies,
listPoliciesResponse_httpStatus,
)
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 ListPolicies = ListPolicies'
{
ListPolicies -> Maybe Text
pathPrefix :: Prelude.Maybe Prelude.Text,
ListPolicies -> Maybe Bool
onlyAttached :: Prelude.Maybe Prelude.Bool,
ListPolicies -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
ListPolicies -> Maybe PolicyScopeType
scope :: Prelude.Maybe PolicyScopeType,
ListPolicies -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural,
ListPolicies -> Maybe PolicyUsageType
policyUsageFilter :: Prelude.Maybe PolicyUsageType
}
deriving (ListPolicies -> ListPolicies -> Bool
(ListPolicies -> ListPolicies -> Bool)
-> (ListPolicies -> ListPolicies -> Bool) -> Eq ListPolicies
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPolicies -> ListPolicies -> Bool
$c/= :: ListPolicies -> ListPolicies -> Bool
== :: ListPolicies -> ListPolicies -> Bool
$c== :: ListPolicies -> ListPolicies -> Bool
Prelude.Eq, ReadPrec [ListPolicies]
ReadPrec ListPolicies
Int -> ReadS ListPolicies
ReadS [ListPolicies]
(Int -> ReadS ListPolicies)
-> ReadS [ListPolicies]
-> ReadPrec ListPolicies
-> ReadPrec [ListPolicies]
-> Read ListPolicies
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPolicies]
$creadListPrec :: ReadPrec [ListPolicies]
readPrec :: ReadPrec ListPolicies
$creadPrec :: ReadPrec ListPolicies
readList :: ReadS [ListPolicies]
$creadList :: ReadS [ListPolicies]
readsPrec :: Int -> ReadS ListPolicies
$creadsPrec :: Int -> ReadS ListPolicies
Prelude.Read, Int -> ListPolicies -> ShowS
[ListPolicies] -> ShowS
ListPolicies -> String
(Int -> ListPolicies -> ShowS)
-> (ListPolicies -> String)
-> ([ListPolicies] -> ShowS)
-> Show ListPolicies
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPolicies] -> ShowS
$cshowList :: [ListPolicies] -> ShowS
show :: ListPolicies -> String
$cshow :: ListPolicies -> String
showsPrec :: Int -> ListPolicies -> ShowS
$cshowsPrec :: Int -> ListPolicies -> ShowS
Prelude.Show, (forall x. ListPolicies -> Rep ListPolicies x)
-> (forall x. Rep ListPolicies x -> ListPolicies)
-> Generic ListPolicies
forall x. Rep ListPolicies x -> ListPolicies
forall x. ListPolicies -> Rep ListPolicies x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListPolicies x -> ListPolicies
$cfrom :: forall x. ListPolicies -> Rep ListPolicies x
Prelude.Generic)
newListPolicies ::
ListPolicies
newListPolicies :: ListPolicies
newListPolicies =
ListPolicies' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe PolicyScopeType
-> Maybe Natural
-> Maybe PolicyUsageType
-> ListPolicies
ListPolicies'
{ $sel:pathPrefix:ListPolicies' :: Maybe Text
pathPrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:onlyAttached:ListPolicies' :: Maybe Bool
onlyAttached = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:marker:ListPolicies' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:scope:ListPolicies' :: Maybe PolicyScopeType
scope = Maybe PolicyScopeType
forall a. Maybe a
Prelude.Nothing,
$sel:maxItems:ListPolicies' :: Maybe Natural
maxItems = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:policyUsageFilter:ListPolicies' :: Maybe PolicyUsageType
policyUsageFilter = Maybe PolicyUsageType
forall a. Maybe a
Prelude.Nothing
}
listPolicies_pathPrefix :: Lens.Lens' ListPolicies (Prelude.Maybe Prelude.Text)
listPolicies_pathPrefix :: (Maybe Text -> f (Maybe Text)) -> ListPolicies -> f ListPolicies
listPolicies_pathPrefix = (ListPolicies -> Maybe Text)
-> (ListPolicies -> Maybe Text -> ListPolicies)
-> Lens ListPolicies ListPolicies (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicies' {Maybe Text
pathPrefix :: Maybe Text
$sel:pathPrefix:ListPolicies' :: ListPolicies -> Maybe Text
pathPrefix} -> Maybe Text
pathPrefix) (\s :: ListPolicies
s@ListPolicies' {} Maybe Text
a -> ListPolicies
s {$sel:pathPrefix:ListPolicies' :: Maybe Text
pathPrefix = Maybe Text
a} :: ListPolicies)
listPolicies_onlyAttached :: Lens.Lens' ListPolicies (Prelude.Maybe Prelude.Bool)
listPolicies_onlyAttached :: (Maybe Bool -> f (Maybe Bool)) -> ListPolicies -> f ListPolicies
listPolicies_onlyAttached = (ListPolicies -> Maybe Bool)
-> (ListPolicies -> Maybe Bool -> ListPolicies)
-> Lens ListPolicies ListPolicies (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicies' {Maybe Bool
onlyAttached :: Maybe Bool
$sel:onlyAttached:ListPolicies' :: ListPolicies -> Maybe Bool
onlyAttached} -> Maybe Bool
onlyAttached) (\s :: ListPolicies
s@ListPolicies' {} Maybe Bool
a -> ListPolicies
s {$sel:onlyAttached:ListPolicies' :: Maybe Bool
onlyAttached = Maybe Bool
a} :: ListPolicies)
listPolicies_marker :: Lens.Lens' ListPolicies (Prelude.Maybe Prelude.Text)
listPolicies_marker :: (Maybe Text -> f (Maybe Text)) -> ListPolicies -> f ListPolicies
listPolicies_marker = (ListPolicies -> Maybe Text)
-> (ListPolicies -> Maybe Text -> ListPolicies)
-> Lens ListPolicies ListPolicies (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicies' {Maybe Text
marker :: Maybe Text
$sel:marker:ListPolicies' :: ListPolicies -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListPolicies
s@ListPolicies' {} Maybe Text
a -> ListPolicies
s {$sel:marker:ListPolicies' :: Maybe Text
marker = Maybe Text
a} :: ListPolicies)
listPolicies_scope :: Lens.Lens' ListPolicies (Prelude.Maybe PolicyScopeType)
listPolicies_scope :: (Maybe PolicyScopeType -> f (Maybe PolicyScopeType))
-> ListPolicies -> f ListPolicies
listPolicies_scope = (ListPolicies -> Maybe PolicyScopeType)
-> (ListPolicies -> Maybe PolicyScopeType -> ListPolicies)
-> Lens
ListPolicies
ListPolicies
(Maybe PolicyScopeType)
(Maybe PolicyScopeType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicies' {Maybe PolicyScopeType
scope :: Maybe PolicyScopeType
$sel:scope:ListPolicies' :: ListPolicies -> Maybe PolicyScopeType
scope} -> Maybe PolicyScopeType
scope) (\s :: ListPolicies
s@ListPolicies' {} Maybe PolicyScopeType
a -> ListPolicies
s {$sel:scope:ListPolicies' :: Maybe PolicyScopeType
scope = Maybe PolicyScopeType
a} :: ListPolicies)
listPolicies_maxItems :: Lens.Lens' ListPolicies (Prelude.Maybe Prelude.Natural)
listPolicies_maxItems :: (Maybe Natural -> f (Maybe Natural))
-> ListPolicies -> f ListPolicies
listPolicies_maxItems = (ListPolicies -> Maybe Natural)
-> (ListPolicies -> Maybe Natural -> ListPolicies)
-> Lens ListPolicies ListPolicies (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicies' {Maybe Natural
maxItems :: Maybe Natural
$sel:maxItems:ListPolicies' :: ListPolicies -> Maybe Natural
maxItems} -> Maybe Natural
maxItems) (\s :: ListPolicies
s@ListPolicies' {} Maybe Natural
a -> ListPolicies
s {$sel:maxItems:ListPolicies' :: Maybe Natural
maxItems = Maybe Natural
a} :: ListPolicies)
listPolicies_policyUsageFilter :: Lens.Lens' ListPolicies (Prelude.Maybe PolicyUsageType)
listPolicies_policyUsageFilter :: (Maybe PolicyUsageType -> f (Maybe PolicyUsageType))
-> ListPolicies -> f ListPolicies
listPolicies_policyUsageFilter = (ListPolicies -> Maybe PolicyUsageType)
-> (ListPolicies -> Maybe PolicyUsageType -> ListPolicies)
-> Lens
ListPolicies
ListPolicies
(Maybe PolicyUsageType)
(Maybe PolicyUsageType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicies' {Maybe PolicyUsageType
policyUsageFilter :: Maybe PolicyUsageType
$sel:policyUsageFilter:ListPolicies' :: ListPolicies -> Maybe PolicyUsageType
policyUsageFilter} -> Maybe PolicyUsageType
policyUsageFilter) (\s :: ListPolicies
s@ListPolicies' {} Maybe PolicyUsageType
a -> ListPolicies
s {$sel:policyUsageFilter:ListPolicies' :: Maybe PolicyUsageType
policyUsageFilter = Maybe PolicyUsageType
a} :: ListPolicies)
instance Core.AWSPager ListPolicies where
page :: ListPolicies -> AWSResponse ListPolicies -> Maybe ListPolicies
page ListPolicies
rq AWSResponse ListPolicies
rs
| Maybe Bool -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListPolicies
ListPoliciesResponse
rs
ListPoliciesResponse
-> Getting (First Bool) ListPoliciesResponse Bool -> Maybe Bool
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Bool -> Const (First Bool) (Maybe Bool))
-> ListPoliciesResponse -> Const (First Bool) ListPoliciesResponse
Lens' ListPoliciesResponse (Maybe Bool)
listPoliciesResponse_isTruncated
((Maybe Bool -> Const (First Bool) (Maybe Bool))
-> ListPoliciesResponse -> Const (First Bool) ListPoliciesResponse)
-> ((Bool -> Const (First Bool) Bool)
-> Maybe Bool -> Const (First Bool) (Maybe Bool))
-> Getting (First Bool) ListPoliciesResponse 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 ListPolicies
forall a. Maybe a
Prelude.Nothing
| Maybe Text -> Bool
forall a. Maybe a -> Bool
Prelude.isNothing
( AWSResponse ListPolicies
ListPoliciesResponse
rs
ListPoliciesResponse
-> Getting (First Text) ListPoliciesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListPoliciesResponse -> Const (First Text) ListPoliciesResponse
Lens' ListPoliciesResponse (Maybe Text)
listPoliciesResponse_marker ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListPoliciesResponse -> Const (First Text) ListPoliciesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListPoliciesResponse 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 ListPolicies
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListPolicies -> Maybe ListPolicies
forall a. a -> Maybe a
Prelude.Just (ListPolicies -> Maybe ListPolicies)
-> ListPolicies -> Maybe ListPolicies
forall a b. (a -> b) -> a -> b
Prelude.$
ListPolicies
rq
ListPolicies -> (ListPolicies -> ListPolicies) -> ListPolicies
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListPolicies -> Identity ListPolicies
Lens ListPolicies ListPolicies (Maybe Text) (Maybe Text)
listPolicies_marker
((Maybe Text -> Identity (Maybe Text))
-> ListPolicies -> Identity ListPolicies)
-> Maybe Text -> ListPolicies -> ListPolicies
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListPolicies
ListPoliciesResponse
rs
ListPoliciesResponse
-> Getting (First Text) ListPoliciesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListPoliciesResponse -> Const (First Text) ListPoliciesResponse
Lens' ListPoliciesResponse (Maybe Text)
listPoliciesResponse_marker ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListPoliciesResponse -> Const (First Text) ListPoliciesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListPoliciesResponse 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 ListPolicies where
type AWSResponse ListPolicies = ListPoliciesResponse
request :: ListPolicies -> Request ListPolicies
request = Service -> ListPolicies -> Request ListPolicies
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy ListPolicies
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListPolicies)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse ListPolicies))
-> Logger
-> Service
-> Proxy ListPolicies
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListPolicies)))
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
"ListPoliciesResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Text
-> Maybe Bool -> Maybe [Policy] -> Int -> ListPoliciesResponse
ListPoliciesResponse'
(Maybe Text
-> Maybe Bool -> Maybe [Policy] -> Int -> ListPoliciesResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Bool -> Maybe [Policy] -> Int -> ListPoliciesResponse)
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 -> Maybe [Policy] -> Int -> ListPoliciesResponse)
-> Either String (Maybe Bool)
-> Either String (Maybe [Policy] -> Int -> ListPoliciesResponse)
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 (Maybe [Policy] -> Int -> ListPoliciesResponse)
-> Either String (Maybe [Policy])
-> Either String (Int -> ListPoliciesResponse)
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
"Policies" 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 (Maybe [Policy]))
-> Either String (Maybe [Policy])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Policy])
-> [Node] -> Either String (Maybe [Policy])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Policy]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either String (Int -> ListPoliciesResponse)
-> Either String Int -> Either String ListPoliciesResponse
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 ListPolicies
instance Prelude.NFData ListPolicies
instance Core.ToHeaders ListPolicies where
toHeaders :: ListPolicies -> ResponseHeaders
toHeaders = ResponseHeaders -> ListPolicies -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ListPolicies where
toPath :: ListPolicies -> ByteString
toPath = ByteString -> ListPolicies -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListPolicies where
toQuery :: ListPolicies -> QueryString
toQuery ListPolicies' {Maybe Bool
Maybe Natural
Maybe Text
Maybe PolicyScopeType
Maybe PolicyUsageType
policyUsageFilter :: Maybe PolicyUsageType
maxItems :: Maybe Natural
scope :: Maybe PolicyScopeType
marker :: Maybe Text
onlyAttached :: Maybe Bool
pathPrefix :: Maybe Text
$sel:policyUsageFilter:ListPolicies' :: ListPolicies -> Maybe PolicyUsageType
$sel:maxItems:ListPolicies' :: ListPolicies -> Maybe Natural
$sel:scope:ListPolicies' :: ListPolicies -> Maybe PolicyScopeType
$sel:marker:ListPolicies' :: ListPolicies -> Maybe Text
$sel:onlyAttached:ListPolicies' :: ListPolicies -> Maybe Bool
$sel:pathPrefix:ListPolicies' :: ListPolicies -> 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
"ListPolicies" :: 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
"OnlyAttached" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
onlyAttached,
ByteString
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
ByteString
"Scope" ByteString -> Maybe PolicyScopeType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe PolicyScopeType
scope,
ByteString
"MaxItems" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxItems,
ByteString
"PolicyUsageFilter" ByteString -> Maybe PolicyUsageType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe PolicyUsageType
policyUsageFilter
]
data ListPoliciesResponse = ListPoliciesResponse'
{
ListPoliciesResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
ListPoliciesResponse -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
ListPoliciesResponse -> Maybe [Policy]
policies :: Prelude.Maybe [Policy],
ListPoliciesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListPoliciesResponse -> ListPoliciesResponse -> Bool
(ListPoliciesResponse -> ListPoliciesResponse -> Bool)
-> (ListPoliciesResponse -> ListPoliciesResponse -> Bool)
-> Eq ListPoliciesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPoliciesResponse -> ListPoliciesResponse -> Bool
$c/= :: ListPoliciesResponse -> ListPoliciesResponse -> Bool
== :: ListPoliciesResponse -> ListPoliciesResponse -> Bool
$c== :: ListPoliciesResponse -> ListPoliciesResponse -> Bool
Prelude.Eq, ReadPrec [ListPoliciesResponse]
ReadPrec ListPoliciesResponse
Int -> ReadS ListPoliciesResponse
ReadS [ListPoliciesResponse]
(Int -> ReadS ListPoliciesResponse)
-> ReadS [ListPoliciesResponse]
-> ReadPrec ListPoliciesResponse
-> ReadPrec [ListPoliciesResponse]
-> Read ListPoliciesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPoliciesResponse]
$creadListPrec :: ReadPrec [ListPoliciesResponse]
readPrec :: ReadPrec ListPoliciesResponse
$creadPrec :: ReadPrec ListPoliciesResponse
readList :: ReadS [ListPoliciesResponse]
$creadList :: ReadS [ListPoliciesResponse]
readsPrec :: Int -> ReadS ListPoliciesResponse
$creadsPrec :: Int -> ReadS ListPoliciesResponse
Prelude.Read, Int -> ListPoliciesResponse -> ShowS
[ListPoliciesResponse] -> ShowS
ListPoliciesResponse -> String
(Int -> ListPoliciesResponse -> ShowS)
-> (ListPoliciesResponse -> String)
-> ([ListPoliciesResponse] -> ShowS)
-> Show ListPoliciesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPoliciesResponse] -> ShowS
$cshowList :: [ListPoliciesResponse] -> ShowS
show :: ListPoliciesResponse -> String
$cshow :: ListPoliciesResponse -> String
showsPrec :: Int -> ListPoliciesResponse -> ShowS
$cshowsPrec :: Int -> ListPoliciesResponse -> ShowS
Prelude.Show, (forall x. ListPoliciesResponse -> Rep ListPoliciesResponse x)
-> (forall x. Rep ListPoliciesResponse x -> ListPoliciesResponse)
-> Generic ListPoliciesResponse
forall x. Rep ListPoliciesResponse x -> ListPoliciesResponse
forall x. ListPoliciesResponse -> Rep ListPoliciesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListPoliciesResponse x -> ListPoliciesResponse
$cfrom :: forall x. ListPoliciesResponse -> Rep ListPoliciesResponse x
Prelude.Generic)
newListPoliciesResponse ::
Prelude.Int ->
ListPoliciesResponse
newListPoliciesResponse :: Int -> ListPoliciesResponse
newListPoliciesResponse Int
pHttpStatus_ =
ListPoliciesResponse' :: Maybe Text
-> Maybe Bool -> Maybe [Policy] -> Int -> ListPoliciesResponse
ListPoliciesResponse'
{ $sel:marker:ListPoliciesResponse' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isTruncated:ListPoliciesResponse' :: Maybe Bool
isTruncated = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:policies:ListPoliciesResponse' :: Maybe [Policy]
policies = Maybe [Policy]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListPoliciesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listPoliciesResponse_marker :: Lens.Lens' ListPoliciesResponse (Prelude.Maybe Prelude.Text)
listPoliciesResponse_marker :: (Maybe Text -> f (Maybe Text))
-> ListPoliciesResponse -> f ListPoliciesResponse
listPoliciesResponse_marker = (ListPoliciesResponse -> Maybe Text)
-> (ListPoliciesResponse -> Maybe Text -> ListPoliciesResponse)
-> Lens' ListPoliciesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPoliciesResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:ListPoliciesResponse' :: ListPoliciesResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListPoliciesResponse
s@ListPoliciesResponse' {} Maybe Text
a -> ListPoliciesResponse
s {$sel:marker:ListPoliciesResponse' :: Maybe Text
marker = Maybe Text
a} :: ListPoliciesResponse)
listPoliciesResponse_isTruncated :: Lens.Lens' ListPoliciesResponse (Prelude.Maybe Prelude.Bool)
listPoliciesResponse_isTruncated :: (Maybe Bool -> f (Maybe Bool))
-> ListPoliciesResponse -> f ListPoliciesResponse
listPoliciesResponse_isTruncated = (ListPoliciesResponse -> Maybe Bool)
-> (ListPoliciesResponse -> Maybe Bool -> ListPoliciesResponse)
-> Lens' ListPoliciesResponse (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPoliciesResponse' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ListPoliciesResponse' :: ListPoliciesResponse -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ListPoliciesResponse
s@ListPoliciesResponse' {} Maybe Bool
a -> ListPoliciesResponse
s {$sel:isTruncated:ListPoliciesResponse' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ListPoliciesResponse)
listPoliciesResponse_policies :: Lens.Lens' ListPoliciesResponse (Prelude.Maybe [Policy])
listPoliciesResponse_policies :: (Maybe [Policy] -> f (Maybe [Policy]))
-> ListPoliciesResponse -> f ListPoliciesResponse
listPoliciesResponse_policies = (ListPoliciesResponse -> Maybe [Policy])
-> (ListPoliciesResponse -> Maybe [Policy] -> ListPoliciesResponse)
-> Lens
ListPoliciesResponse
ListPoliciesResponse
(Maybe [Policy])
(Maybe [Policy])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPoliciesResponse' {Maybe [Policy]
policies :: Maybe [Policy]
$sel:policies:ListPoliciesResponse' :: ListPoliciesResponse -> Maybe [Policy]
policies} -> Maybe [Policy]
policies) (\s :: ListPoliciesResponse
s@ListPoliciesResponse' {} Maybe [Policy]
a -> ListPoliciesResponse
s {$sel:policies:ListPoliciesResponse' :: Maybe [Policy]
policies = Maybe [Policy]
a} :: ListPoliciesResponse) ((Maybe [Policy] -> f (Maybe [Policy]))
-> ListPoliciesResponse -> f ListPoliciesResponse)
-> ((Maybe [Policy] -> f (Maybe [Policy]))
-> Maybe [Policy] -> f (Maybe [Policy]))
-> (Maybe [Policy] -> f (Maybe [Policy]))
-> ListPoliciesResponse
-> f ListPoliciesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Policy] [Policy] [Policy] [Policy]
-> Iso
(Maybe [Policy]) (Maybe [Policy]) (Maybe [Policy]) (Maybe [Policy])
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 [Policy] [Policy] [Policy] [Policy]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listPoliciesResponse_httpStatus :: Lens.Lens' ListPoliciesResponse Prelude.Int
listPoliciesResponse_httpStatus :: (Int -> f Int) -> ListPoliciesResponse -> f ListPoliciesResponse
listPoliciesResponse_httpStatus = (ListPoliciesResponse -> Int)
-> (ListPoliciesResponse -> Int -> ListPoliciesResponse)
-> Lens ListPoliciesResponse ListPoliciesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPoliciesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListPoliciesResponse' :: ListPoliciesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListPoliciesResponse
s@ListPoliciesResponse' {} Int
a -> ListPoliciesResponse
s {$sel:httpStatus:ListPoliciesResponse' :: Int
httpStatus = Int
a} :: ListPoliciesResponse)
instance Prelude.NFData ListPoliciesResponse