{-# 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.ListPolicyVersions
(
ListPolicyVersions (..),
newListPolicyVersions,
listPolicyVersions_marker,
listPolicyVersions_maxItems,
listPolicyVersions_policyArn,
ListPolicyVersionsResponse (..),
newListPolicyVersionsResponse,
listPolicyVersionsResponse_versions,
listPolicyVersionsResponse_marker,
listPolicyVersionsResponse_isTruncated,
listPolicyVersionsResponse_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 ListPolicyVersions = ListPolicyVersions'
{
ListPolicyVersions -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
ListPolicyVersions -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural,
ListPolicyVersions -> Text
policyArn :: Prelude.Text
}
deriving (ListPolicyVersions -> ListPolicyVersions -> Bool
(ListPolicyVersions -> ListPolicyVersions -> Bool)
-> (ListPolicyVersions -> ListPolicyVersions -> Bool)
-> Eq ListPolicyVersions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPolicyVersions -> ListPolicyVersions -> Bool
$c/= :: ListPolicyVersions -> ListPolicyVersions -> Bool
== :: ListPolicyVersions -> ListPolicyVersions -> Bool
$c== :: ListPolicyVersions -> ListPolicyVersions -> Bool
Prelude.Eq, ReadPrec [ListPolicyVersions]
ReadPrec ListPolicyVersions
Int -> ReadS ListPolicyVersions
ReadS [ListPolicyVersions]
(Int -> ReadS ListPolicyVersions)
-> ReadS [ListPolicyVersions]
-> ReadPrec ListPolicyVersions
-> ReadPrec [ListPolicyVersions]
-> Read ListPolicyVersions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPolicyVersions]
$creadListPrec :: ReadPrec [ListPolicyVersions]
readPrec :: ReadPrec ListPolicyVersions
$creadPrec :: ReadPrec ListPolicyVersions
readList :: ReadS [ListPolicyVersions]
$creadList :: ReadS [ListPolicyVersions]
readsPrec :: Int -> ReadS ListPolicyVersions
$creadsPrec :: Int -> ReadS ListPolicyVersions
Prelude.Read, Int -> ListPolicyVersions -> ShowS
[ListPolicyVersions] -> ShowS
ListPolicyVersions -> String
(Int -> ListPolicyVersions -> ShowS)
-> (ListPolicyVersions -> String)
-> ([ListPolicyVersions] -> ShowS)
-> Show ListPolicyVersions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPolicyVersions] -> ShowS
$cshowList :: [ListPolicyVersions] -> ShowS
show :: ListPolicyVersions -> String
$cshow :: ListPolicyVersions -> String
showsPrec :: Int -> ListPolicyVersions -> ShowS
$cshowsPrec :: Int -> ListPolicyVersions -> ShowS
Prelude.Show, (forall x. ListPolicyVersions -> Rep ListPolicyVersions x)
-> (forall x. Rep ListPolicyVersions x -> ListPolicyVersions)
-> Generic ListPolicyVersions
forall x. Rep ListPolicyVersions x -> ListPolicyVersions
forall x. ListPolicyVersions -> Rep ListPolicyVersions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListPolicyVersions x -> ListPolicyVersions
$cfrom :: forall x. ListPolicyVersions -> Rep ListPolicyVersions x
Prelude.Generic)
newListPolicyVersions ::
Prelude.Text ->
ListPolicyVersions
newListPolicyVersions :: Text -> ListPolicyVersions
newListPolicyVersions Text
pPolicyArn_ =
ListPolicyVersions' :: Maybe Text -> Maybe Natural -> Text -> ListPolicyVersions
ListPolicyVersions'
{ $sel:marker:ListPolicyVersions' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxItems:ListPolicyVersions' :: Maybe Natural
maxItems = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:policyArn:ListPolicyVersions' :: Text
policyArn = Text
pPolicyArn_
}
listPolicyVersions_marker :: Lens.Lens' ListPolicyVersions (Prelude.Maybe Prelude.Text)
listPolicyVersions_marker :: (Maybe Text -> f (Maybe Text))
-> ListPolicyVersions -> f ListPolicyVersions
listPolicyVersions_marker = (ListPolicyVersions -> Maybe Text)
-> (ListPolicyVersions -> Maybe Text -> ListPolicyVersions)
-> Lens
ListPolicyVersions ListPolicyVersions (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicyVersions' {Maybe Text
marker :: Maybe Text
$sel:marker:ListPolicyVersions' :: ListPolicyVersions -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListPolicyVersions
s@ListPolicyVersions' {} Maybe Text
a -> ListPolicyVersions
s {$sel:marker:ListPolicyVersions' :: Maybe Text
marker = Maybe Text
a} :: ListPolicyVersions)
listPolicyVersions_maxItems :: Lens.Lens' ListPolicyVersions (Prelude.Maybe Prelude.Natural)
listPolicyVersions_maxItems :: (Maybe Natural -> f (Maybe Natural))
-> ListPolicyVersions -> f ListPolicyVersions
listPolicyVersions_maxItems = (ListPolicyVersions -> Maybe Natural)
-> (ListPolicyVersions -> Maybe Natural -> ListPolicyVersions)
-> Lens
ListPolicyVersions
ListPolicyVersions
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicyVersions' {Maybe Natural
maxItems :: Maybe Natural
$sel:maxItems:ListPolicyVersions' :: ListPolicyVersions -> Maybe Natural
maxItems} -> Maybe Natural
maxItems) (\s :: ListPolicyVersions
s@ListPolicyVersions' {} Maybe Natural
a -> ListPolicyVersions
s {$sel:maxItems:ListPolicyVersions' :: Maybe Natural
maxItems = Maybe Natural
a} :: ListPolicyVersions)
listPolicyVersions_policyArn :: Lens.Lens' ListPolicyVersions Prelude.Text
listPolicyVersions_policyArn :: (Text -> f Text) -> ListPolicyVersions -> f ListPolicyVersions
listPolicyVersions_policyArn = (ListPolicyVersions -> Text)
-> (ListPolicyVersions -> Text -> ListPolicyVersions)
-> Lens ListPolicyVersions ListPolicyVersions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicyVersions' {Text
policyArn :: Text
$sel:policyArn:ListPolicyVersions' :: ListPolicyVersions -> Text
policyArn} -> Text
policyArn) (\s :: ListPolicyVersions
s@ListPolicyVersions' {} Text
a -> ListPolicyVersions
s {$sel:policyArn:ListPolicyVersions' :: Text
policyArn = Text
a} :: ListPolicyVersions)
instance Core.AWSPager ListPolicyVersions where
page :: ListPolicyVersions
-> AWSResponse ListPolicyVersions -> Maybe ListPolicyVersions
page ListPolicyVersions
rq AWSResponse ListPolicyVersions
rs
| Maybe Bool -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListPolicyVersions
ListPolicyVersionsResponse
rs
ListPolicyVersionsResponse
-> Getting (First Bool) ListPolicyVersionsResponse Bool
-> Maybe Bool
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Bool -> Const (First Bool) (Maybe Bool))
-> ListPolicyVersionsResponse
-> Const (First Bool) ListPolicyVersionsResponse
Lens' ListPolicyVersionsResponse (Maybe Bool)
listPolicyVersionsResponse_isTruncated
((Maybe Bool -> Const (First Bool) (Maybe Bool))
-> ListPolicyVersionsResponse
-> Const (First Bool) ListPolicyVersionsResponse)
-> ((Bool -> Const (First Bool) Bool)
-> Maybe Bool -> Const (First Bool) (Maybe Bool))
-> Getting (First Bool) ListPolicyVersionsResponse 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 ListPolicyVersions
forall a. Maybe a
Prelude.Nothing
| Maybe Text -> Bool
forall a. Maybe a -> Bool
Prelude.isNothing
( AWSResponse ListPolicyVersions
ListPolicyVersionsResponse
rs
ListPolicyVersionsResponse
-> Getting (First Text) ListPolicyVersionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListPolicyVersionsResponse
-> Const (First Text) ListPolicyVersionsResponse
Lens' ListPolicyVersionsResponse (Maybe Text)
listPolicyVersionsResponse_marker
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListPolicyVersionsResponse
-> Const (First Text) ListPolicyVersionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListPolicyVersionsResponse 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 ListPolicyVersions
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListPolicyVersions -> Maybe ListPolicyVersions
forall a. a -> Maybe a
Prelude.Just (ListPolicyVersions -> Maybe ListPolicyVersions)
-> ListPolicyVersions -> Maybe ListPolicyVersions
forall a b. (a -> b) -> a -> b
Prelude.$
ListPolicyVersions
rq
ListPolicyVersions
-> (ListPolicyVersions -> ListPolicyVersions) -> ListPolicyVersions
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListPolicyVersions -> Identity ListPolicyVersions
Lens
ListPolicyVersions ListPolicyVersions (Maybe Text) (Maybe Text)
listPolicyVersions_marker
((Maybe Text -> Identity (Maybe Text))
-> ListPolicyVersions -> Identity ListPolicyVersions)
-> Maybe Text -> ListPolicyVersions -> ListPolicyVersions
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListPolicyVersions
ListPolicyVersionsResponse
rs
ListPolicyVersionsResponse
-> Getting (First Text) ListPolicyVersionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListPolicyVersionsResponse
-> Const (First Text) ListPolicyVersionsResponse
Lens' ListPolicyVersionsResponse (Maybe Text)
listPolicyVersionsResponse_marker
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListPolicyVersionsResponse
-> Const (First Text) ListPolicyVersionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListPolicyVersionsResponse 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 ListPolicyVersions where
type
AWSResponse ListPolicyVersions =
ListPolicyVersionsResponse
request :: ListPolicyVersions -> Request ListPolicyVersions
request = Service -> ListPolicyVersions -> Request ListPolicyVersions
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy ListPolicyVersions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListPolicyVersions)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse ListPolicyVersions))
-> Logger
-> Service
-> Proxy ListPolicyVersions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListPolicyVersions)))
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
"ListPolicyVersionsResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe [PolicyVersion]
-> Maybe Text -> Maybe Bool -> Int -> ListPolicyVersionsResponse
ListPolicyVersionsResponse'
(Maybe [PolicyVersion]
-> Maybe Text -> Maybe Bool -> Int -> ListPolicyVersionsResponse)
-> Either String (Maybe [PolicyVersion])
-> Either
String
(Maybe Text -> Maybe Bool -> Int -> ListPolicyVersionsResponse)
forall (f :: * -> *) a b. Functor 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
"Versions" 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 [PolicyVersion]))
-> Either String (Maybe [PolicyVersion])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [PolicyVersion])
-> [Node] -> Either String (Maybe [PolicyVersion])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [PolicyVersion]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either
String
(Maybe Text -> Maybe Bool -> Int -> ListPolicyVersionsResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Bool -> Int -> ListPolicyVersionsResponse)
forall (f :: * -> *) a b. Applicative f => 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 -> ListPolicyVersionsResponse)
-> Either String (Maybe Bool)
-> Either String (Int -> ListPolicyVersionsResponse)
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 -> ListPolicyVersionsResponse)
-> Either String Int -> Either String ListPolicyVersionsResponse
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 ListPolicyVersions
instance Prelude.NFData ListPolicyVersions
instance Core.ToHeaders ListPolicyVersions where
toHeaders :: ListPolicyVersions -> ResponseHeaders
toHeaders = ResponseHeaders -> ListPolicyVersions -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ListPolicyVersions where
toPath :: ListPolicyVersions -> ByteString
toPath = ByteString -> ListPolicyVersions -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListPolicyVersions where
toQuery :: ListPolicyVersions -> QueryString
toQuery ListPolicyVersions' {Maybe Natural
Maybe Text
Text
policyArn :: Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:policyArn:ListPolicyVersions' :: ListPolicyVersions -> Text
$sel:maxItems:ListPolicyVersions' :: ListPolicyVersions -> Maybe Natural
$sel:marker:ListPolicyVersions' :: ListPolicyVersions -> 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
"ListPolicyVersions" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
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,
ByteString
"PolicyArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
policyArn
]
data ListPolicyVersionsResponse = ListPolicyVersionsResponse'
{
ListPolicyVersionsResponse -> Maybe [PolicyVersion]
versions :: Prelude.Maybe [PolicyVersion],
ListPolicyVersionsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
ListPolicyVersionsResponse -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
ListPolicyVersionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListPolicyVersionsResponse -> ListPolicyVersionsResponse -> Bool
(ListPolicyVersionsResponse -> ListPolicyVersionsResponse -> Bool)
-> (ListPolicyVersionsResponse
-> ListPolicyVersionsResponse -> Bool)
-> Eq ListPolicyVersionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPolicyVersionsResponse -> ListPolicyVersionsResponse -> Bool
$c/= :: ListPolicyVersionsResponse -> ListPolicyVersionsResponse -> Bool
== :: ListPolicyVersionsResponse -> ListPolicyVersionsResponse -> Bool
$c== :: ListPolicyVersionsResponse -> ListPolicyVersionsResponse -> Bool
Prelude.Eq, ReadPrec [ListPolicyVersionsResponse]
ReadPrec ListPolicyVersionsResponse
Int -> ReadS ListPolicyVersionsResponse
ReadS [ListPolicyVersionsResponse]
(Int -> ReadS ListPolicyVersionsResponse)
-> ReadS [ListPolicyVersionsResponse]
-> ReadPrec ListPolicyVersionsResponse
-> ReadPrec [ListPolicyVersionsResponse]
-> Read ListPolicyVersionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPolicyVersionsResponse]
$creadListPrec :: ReadPrec [ListPolicyVersionsResponse]
readPrec :: ReadPrec ListPolicyVersionsResponse
$creadPrec :: ReadPrec ListPolicyVersionsResponse
readList :: ReadS [ListPolicyVersionsResponse]
$creadList :: ReadS [ListPolicyVersionsResponse]
readsPrec :: Int -> ReadS ListPolicyVersionsResponse
$creadsPrec :: Int -> ReadS ListPolicyVersionsResponse
Prelude.Read, Int -> ListPolicyVersionsResponse -> ShowS
[ListPolicyVersionsResponse] -> ShowS
ListPolicyVersionsResponse -> String
(Int -> ListPolicyVersionsResponse -> ShowS)
-> (ListPolicyVersionsResponse -> String)
-> ([ListPolicyVersionsResponse] -> ShowS)
-> Show ListPolicyVersionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPolicyVersionsResponse] -> ShowS
$cshowList :: [ListPolicyVersionsResponse] -> ShowS
show :: ListPolicyVersionsResponse -> String
$cshow :: ListPolicyVersionsResponse -> String
showsPrec :: Int -> ListPolicyVersionsResponse -> ShowS
$cshowsPrec :: Int -> ListPolicyVersionsResponse -> ShowS
Prelude.Show, (forall x.
ListPolicyVersionsResponse -> Rep ListPolicyVersionsResponse x)
-> (forall x.
Rep ListPolicyVersionsResponse x -> ListPolicyVersionsResponse)
-> Generic ListPolicyVersionsResponse
forall x.
Rep ListPolicyVersionsResponse x -> ListPolicyVersionsResponse
forall x.
ListPolicyVersionsResponse -> Rep ListPolicyVersionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListPolicyVersionsResponse x -> ListPolicyVersionsResponse
$cfrom :: forall x.
ListPolicyVersionsResponse -> Rep ListPolicyVersionsResponse x
Prelude.Generic)
newListPolicyVersionsResponse ::
Prelude.Int ->
ListPolicyVersionsResponse
newListPolicyVersionsResponse :: Int -> ListPolicyVersionsResponse
newListPolicyVersionsResponse Int
pHttpStatus_ =
ListPolicyVersionsResponse' :: Maybe [PolicyVersion]
-> Maybe Text -> Maybe Bool -> Int -> ListPolicyVersionsResponse
ListPolicyVersionsResponse'
{ $sel:versions:ListPolicyVersionsResponse' :: Maybe [PolicyVersion]
versions =
Maybe [PolicyVersion]
forall a. Maybe a
Prelude.Nothing,
$sel:marker:ListPolicyVersionsResponse' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isTruncated:ListPolicyVersionsResponse' :: Maybe Bool
isTruncated = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListPolicyVersionsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listPolicyVersionsResponse_versions :: Lens.Lens' ListPolicyVersionsResponse (Prelude.Maybe [PolicyVersion])
listPolicyVersionsResponse_versions :: (Maybe [PolicyVersion] -> f (Maybe [PolicyVersion]))
-> ListPolicyVersionsResponse -> f ListPolicyVersionsResponse
listPolicyVersionsResponse_versions = (ListPolicyVersionsResponse -> Maybe [PolicyVersion])
-> (ListPolicyVersionsResponse
-> Maybe [PolicyVersion] -> ListPolicyVersionsResponse)
-> Lens
ListPolicyVersionsResponse
ListPolicyVersionsResponse
(Maybe [PolicyVersion])
(Maybe [PolicyVersion])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicyVersionsResponse' {Maybe [PolicyVersion]
versions :: Maybe [PolicyVersion]
$sel:versions:ListPolicyVersionsResponse' :: ListPolicyVersionsResponse -> Maybe [PolicyVersion]
versions} -> Maybe [PolicyVersion]
versions) (\s :: ListPolicyVersionsResponse
s@ListPolicyVersionsResponse' {} Maybe [PolicyVersion]
a -> ListPolicyVersionsResponse
s {$sel:versions:ListPolicyVersionsResponse' :: Maybe [PolicyVersion]
versions = Maybe [PolicyVersion]
a} :: ListPolicyVersionsResponse) ((Maybe [PolicyVersion] -> f (Maybe [PolicyVersion]))
-> ListPolicyVersionsResponse -> f ListPolicyVersionsResponse)
-> ((Maybe [PolicyVersion] -> f (Maybe [PolicyVersion]))
-> Maybe [PolicyVersion] -> f (Maybe [PolicyVersion]))
-> (Maybe [PolicyVersion] -> f (Maybe [PolicyVersion]))
-> ListPolicyVersionsResponse
-> f ListPolicyVersionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[PolicyVersion] [PolicyVersion] [PolicyVersion] [PolicyVersion]
-> Iso
(Maybe [PolicyVersion])
(Maybe [PolicyVersion])
(Maybe [PolicyVersion])
(Maybe [PolicyVersion])
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
[PolicyVersion] [PolicyVersion] [PolicyVersion] [PolicyVersion]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listPolicyVersionsResponse_marker :: Lens.Lens' ListPolicyVersionsResponse (Prelude.Maybe Prelude.Text)
listPolicyVersionsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> ListPolicyVersionsResponse -> f ListPolicyVersionsResponse
listPolicyVersionsResponse_marker = (ListPolicyVersionsResponse -> Maybe Text)
-> (ListPolicyVersionsResponse
-> Maybe Text -> ListPolicyVersionsResponse)
-> Lens' ListPolicyVersionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicyVersionsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:ListPolicyVersionsResponse' :: ListPolicyVersionsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListPolicyVersionsResponse
s@ListPolicyVersionsResponse' {} Maybe Text
a -> ListPolicyVersionsResponse
s {$sel:marker:ListPolicyVersionsResponse' :: Maybe Text
marker = Maybe Text
a} :: ListPolicyVersionsResponse)
listPolicyVersionsResponse_isTruncated :: Lens.Lens' ListPolicyVersionsResponse (Prelude.Maybe Prelude.Bool)
listPolicyVersionsResponse_isTruncated :: (Maybe Bool -> f (Maybe Bool))
-> ListPolicyVersionsResponse -> f ListPolicyVersionsResponse
listPolicyVersionsResponse_isTruncated = (ListPolicyVersionsResponse -> Maybe Bool)
-> (ListPolicyVersionsResponse
-> Maybe Bool -> ListPolicyVersionsResponse)
-> Lens' ListPolicyVersionsResponse (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicyVersionsResponse' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ListPolicyVersionsResponse' :: ListPolicyVersionsResponse -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ListPolicyVersionsResponse
s@ListPolicyVersionsResponse' {} Maybe Bool
a -> ListPolicyVersionsResponse
s {$sel:isTruncated:ListPolicyVersionsResponse' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ListPolicyVersionsResponse)
listPolicyVersionsResponse_httpStatus :: Lens.Lens' ListPolicyVersionsResponse Prelude.Int
listPolicyVersionsResponse_httpStatus :: (Int -> f Int)
-> ListPolicyVersionsResponse -> f ListPolicyVersionsResponse
listPolicyVersionsResponse_httpStatus = (ListPolicyVersionsResponse -> Int)
-> (ListPolicyVersionsResponse
-> Int -> ListPolicyVersionsResponse)
-> Lens
ListPolicyVersionsResponse ListPolicyVersionsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicyVersionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListPolicyVersionsResponse' :: ListPolicyVersionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListPolicyVersionsResponse
s@ListPolicyVersionsResponse' {} Int
a -> ListPolicyVersionsResponse
s {$sel:httpStatus:ListPolicyVersionsResponse' :: Int
httpStatus = Int
a} :: ListPolicyVersionsResponse)
instance Prelude.NFData ListPolicyVersionsResponse