{-# 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.AccessAnalyzer.ListPolicyGenerations
(
ListPolicyGenerations (..),
newListPolicyGenerations,
listPolicyGenerations_nextToken,
listPolicyGenerations_principalArn,
listPolicyGenerations_maxResults,
ListPolicyGenerationsResponse (..),
newListPolicyGenerationsResponse,
listPolicyGenerationsResponse_nextToken,
listPolicyGenerationsResponse_httpStatus,
listPolicyGenerationsResponse_policyGenerations,
)
where
import Amazonka.AccessAnalyzer.Types
import qualified Amazonka.Core as Core
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 ListPolicyGenerations = ListPolicyGenerations'
{
ListPolicyGenerations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListPolicyGenerations -> Maybe Text
principalArn :: Prelude.Maybe Prelude.Text,
ListPolicyGenerations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (ListPolicyGenerations -> ListPolicyGenerations -> Bool
(ListPolicyGenerations -> ListPolicyGenerations -> Bool)
-> (ListPolicyGenerations -> ListPolicyGenerations -> Bool)
-> Eq ListPolicyGenerations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPolicyGenerations -> ListPolicyGenerations -> Bool
$c/= :: ListPolicyGenerations -> ListPolicyGenerations -> Bool
== :: ListPolicyGenerations -> ListPolicyGenerations -> Bool
$c== :: ListPolicyGenerations -> ListPolicyGenerations -> Bool
Prelude.Eq, ReadPrec [ListPolicyGenerations]
ReadPrec ListPolicyGenerations
Int -> ReadS ListPolicyGenerations
ReadS [ListPolicyGenerations]
(Int -> ReadS ListPolicyGenerations)
-> ReadS [ListPolicyGenerations]
-> ReadPrec ListPolicyGenerations
-> ReadPrec [ListPolicyGenerations]
-> Read ListPolicyGenerations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPolicyGenerations]
$creadListPrec :: ReadPrec [ListPolicyGenerations]
readPrec :: ReadPrec ListPolicyGenerations
$creadPrec :: ReadPrec ListPolicyGenerations
readList :: ReadS [ListPolicyGenerations]
$creadList :: ReadS [ListPolicyGenerations]
readsPrec :: Int -> ReadS ListPolicyGenerations
$creadsPrec :: Int -> ReadS ListPolicyGenerations
Prelude.Read, Int -> ListPolicyGenerations -> ShowS
[ListPolicyGenerations] -> ShowS
ListPolicyGenerations -> String
(Int -> ListPolicyGenerations -> ShowS)
-> (ListPolicyGenerations -> String)
-> ([ListPolicyGenerations] -> ShowS)
-> Show ListPolicyGenerations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPolicyGenerations] -> ShowS
$cshowList :: [ListPolicyGenerations] -> ShowS
show :: ListPolicyGenerations -> String
$cshow :: ListPolicyGenerations -> String
showsPrec :: Int -> ListPolicyGenerations -> ShowS
$cshowsPrec :: Int -> ListPolicyGenerations -> ShowS
Prelude.Show, (forall x. ListPolicyGenerations -> Rep ListPolicyGenerations x)
-> (forall x. Rep ListPolicyGenerations x -> ListPolicyGenerations)
-> Generic ListPolicyGenerations
forall x. Rep ListPolicyGenerations x -> ListPolicyGenerations
forall x. ListPolicyGenerations -> Rep ListPolicyGenerations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListPolicyGenerations x -> ListPolicyGenerations
$cfrom :: forall x. ListPolicyGenerations -> Rep ListPolicyGenerations x
Prelude.Generic)
newListPolicyGenerations ::
ListPolicyGenerations
newListPolicyGenerations :: ListPolicyGenerations
newListPolicyGenerations =
ListPolicyGenerations' :: Maybe Text -> Maybe Text -> Maybe Natural -> ListPolicyGenerations
ListPolicyGenerations'
{ $sel:nextToken:ListPolicyGenerations' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:principalArn:ListPolicyGenerations' :: Maybe Text
principalArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListPolicyGenerations' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
listPolicyGenerations_nextToken :: Lens.Lens' ListPolicyGenerations (Prelude.Maybe Prelude.Text)
listPolicyGenerations_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPolicyGenerations -> f ListPolicyGenerations
listPolicyGenerations_nextToken = (ListPolicyGenerations -> Maybe Text)
-> (ListPolicyGenerations -> Maybe Text -> ListPolicyGenerations)
-> Lens
ListPolicyGenerations
ListPolicyGenerations
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicyGenerations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPolicyGenerations' :: ListPolicyGenerations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPolicyGenerations
s@ListPolicyGenerations' {} Maybe Text
a -> ListPolicyGenerations
s {$sel:nextToken:ListPolicyGenerations' :: Maybe Text
nextToken = Maybe Text
a} :: ListPolicyGenerations)
listPolicyGenerations_principalArn :: Lens.Lens' ListPolicyGenerations (Prelude.Maybe Prelude.Text)
listPolicyGenerations_principalArn :: (Maybe Text -> f (Maybe Text))
-> ListPolicyGenerations -> f ListPolicyGenerations
listPolicyGenerations_principalArn = (ListPolicyGenerations -> Maybe Text)
-> (ListPolicyGenerations -> Maybe Text -> ListPolicyGenerations)
-> Lens
ListPolicyGenerations
ListPolicyGenerations
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicyGenerations' {Maybe Text
principalArn :: Maybe Text
$sel:principalArn:ListPolicyGenerations' :: ListPolicyGenerations -> Maybe Text
principalArn} -> Maybe Text
principalArn) (\s :: ListPolicyGenerations
s@ListPolicyGenerations' {} Maybe Text
a -> ListPolicyGenerations
s {$sel:principalArn:ListPolicyGenerations' :: Maybe Text
principalArn = Maybe Text
a} :: ListPolicyGenerations)
listPolicyGenerations_maxResults :: Lens.Lens' ListPolicyGenerations (Prelude.Maybe Prelude.Natural)
listPolicyGenerations_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListPolicyGenerations -> f ListPolicyGenerations
listPolicyGenerations_maxResults = (ListPolicyGenerations -> Maybe Natural)
-> (ListPolicyGenerations
-> Maybe Natural -> ListPolicyGenerations)
-> Lens
ListPolicyGenerations
ListPolicyGenerations
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicyGenerations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListPolicyGenerations' :: ListPolicyGenerations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListPolicyGenerations
s@ListPolicyGenerations' {} Maybe Natural
a -> ListPolicyGenerations
s {$sel:maxResults:ListPolicyGenerations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListPolicyGenerations)
instance Core.AWSPager ListPolicyGenerations where
page :: ListPolicyGenerations
-> AWSResponse ListPolicyGenerations -> Maybe ListPolicyGenerations
page ListPolicyGenerations
rq AWSResponse ListPolicyGenerations
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListPolicyGenerations
ListPolicyGenerationsResponse
rs
ListPolicyGenerationsResponse
-> Getting (First Text) ListPolicyGenerationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListPolicyGenerationsResponse
-> Const (First Text) ListPolicyGenerationsResponse
Lens' ListPolicyGenerationsResponse (Maybe Text)
listPolicyGenerationsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListPolicyGenerationsResponse
-> Const (First Text) ListPolicyGenerationsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListPolicyGenerationsResponse 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 ListPolicyGenerations
forall a. Maybe a
Prelude.Nothing
| [PolicyGeneration] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListPolicyGenerations
ListPolicyGenerationsResponse
rs
ListPolicyGenerationsResponse
-> Getting
[PolicyGeneration] ListPolicyGenerationsResponse [PolicyGeneration]
-> [PolicyGeneration]
forall s a. s -> Getting a s a -> a
Lens.^. Getting
[PolicyGeneration] ListPolicyGenerationsResponse [PolicyGeneration]
Lens' ListPolicyGenerationsResponse [PolicyGeneration]
listPolicyGenerationsResponse_policyGenerations
) =
Maybe ListPolicyGenerations
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListPolicyGenerations -> Maybe ListPolicyGenerations
forall a. a -> Maybe a
Prelude.Just (ListPolicyGenerations -> Maybe ListPolicyGenerations)
-> ListPolicyGenerations -> Maybe ListPolicyGenerations
forall a b. (a -> b) -> a -> b
Prelude.$
ListPolicyGenerations
rq
ListPolicyGenerations
-> (ListPolicyGenerations -> ListPolicyGenerations)
-> ListPolicyGenerations
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListPolicyGenerations -> Identity ListPolicyGenerations
Lens
ListPolicyGenerations
ListPolicyGenerations
(Maybe Text)
(Maybe Text)
listPolicyGenerations_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListPolicyGenerations -> Identity ListPolicyGenerations)
-> Maybe Text -> ListPolicyGenerations -> ListPolicyGenerations
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListPolicyGenerations
ListPolicyGenerationsResponse
rs
ListPolicyGenerationsResponse
-> Getting (First Text) ListPolicyGenerationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListPolicyGenerationsResponse
-> Const (First Text) ListPolicyGenerationsResponse
Lens' ListPolicyGenerationsResponse (Maybe Text)
listPolicyGenerationsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListPolicyGenerationsResponse
-> Const (First Text) ListPolicyGenerationsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListPolicyGenerationsResponse 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 ListPolicyGenerations where
type
AWSResponse ListPolicyGenerations =
ListPolicyGenerationsResponse
request :: ListPolicyGenerations -> Request ListPolicyGenerations
request = Service -> ListPolicyGenerations -> Request ListPolicyGenerations
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListPolicyGenerations
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListPolicyGenerations)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListPolicyGenerations))
-> Logger
-> Service
-> Proxy ListPolicyGenerations
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListPolicyGenerations)))
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 Text
-> Int -> [PolicyGeneration] -> ListPolicyGenerationsResponse
ListPolicyGenerationsResponse'
(Maybe Text
-> Int -> [PolicyGeneration] -> ListPolicyGenerationsResponse)
-> Either String (Maybe Text)
-> Either
String (Int -> [PolicyGeneration] -> ListPolicyGenerationsResponse)
forall (f :: * -> *) a b. Functor 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 -> [PolicyGeneration] -> ListPolicyGenerationsResponse)
-> Either String Int
-> Either
String ([PolicyGeneration] -> ListPolicyGenerationsResponse)
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 ([PolicyGeneration] -> ListPolicyGenerationsResponse)
-> Either String [PolicyGeneration]
-> Either String ListPolicyGenerationsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe [PolicyGeneration])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"policyGenerations"
Either String (Maybe [PolicyGeneration])
-> [PolicyGeneration] -> Either String [PolicyGeneration]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [PolicyGeneration]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable ListPolicyGenerations
instance Prelude.NFData ListPolicyGenerations
instance Core.ToHeaders ListPolicyGenerations where
toHeaders :: ListPolicyGenerations -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListPolicyGenerations -> 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 ListPolicyGenerations where
toPath :: ListPolicyGenerations -> ByteString
toPath = ByteString -> ListPolicyGenerations -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/policy/generation"
instance Core.ToQuery ListPolicyGenerations where
toQuery :: ListPolicyGenerations -> QueryString
toQuery ListPolicyGenerations' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
principalArn :: Maybe Text
nextToken :: Maybe Text
$sel:maxResults:ListPolicyGenerations' :: ListPolicyGenerations -> Maybe Natural
$sel:principalArn:ListPolicyGenerations' :: ListPolicyGenerations -> Maybe Text
$sel:nextToken:ListPolicyGenerations' :: ListPolicyGenerations -> 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
"principalArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
principalArn,
ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
]
data ListPolicyGenerationsResponse = ListPolicyGenerationsResponse'
{
ListPolicyGenerationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListPolicyGenerationsResponse -> Int
httpStatus :: Prelude.Int,
ListPolicyGenerationsResponse -> [PolicyGeneration]
policyGenerations :: [PolicyGeneration]
}
deriving (ListPolicyGenerationsResponse
-> ListPolicyGenerationsResponse -> Bool
(ListPolicyGenerationsResponse
-> ListPolicyGenerationsResponse -> Bool)
-> (ListPolicyGenerationsResponse
-> ListPolicyGenerationsResponse -> Bool)
-> Eq ListPolicyGenerationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPolicyGenerationsResponse
-> ListPolicyGenerationsResponse -> Bool
$c/= :: ListPolicyGenerationsResponse
-> ListPolicyGenerationsResponse -> Bool
== :: ListPolicyGenerationsResponse
-> ListPolicyGenerationsResponse -> Bool
$c== :: ListPolicyGenerationsResponse
-> ListPolicyGenerationsResponse -> Bool
Prelude.Eq, ReadPrec [ListPolicyGenerationsResponse]
ReadPrec ListPolicyGenerationsResponse
Int -> ReadS ListPolicyGenerationsResponse
ReadS [ListPolicyGenerationsResponse]
(Int -> ReadS ListPolicyGenerationsResponse)
-> ReadS [ListPolicyGenerationsResponse]
-> ReadPrec ListPolicyGenerationsResponse
-> ReadPrec [ListPolicyGenerationsResponse]
-> Read ListPolicyGenerationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPolicyGenerationsResponse]
$creadListPrec :: ReadPrec [ListPolicyGenerationsResponse]
readPrec :: ReadPrec ListPolicyGenerationsResponse
$creadPrec :: ReadPrec ListPolicyGenerationsResponse
readList :: ReadS [ListPolicyGenerationsResponse]
$creadList :: ReadS [ListPolicyGenerationsResponse]
readsPrec :: Int -> ReadS ListPolicyGenerationsResponse
$creadsPrec :: Int -> ReadS ListPolicyGenerationsResponse
Prelude.Read, Int -> ListPolicyGenerationsResponse -> ShowS
[ListPolicyGenerationsResponse] -> ShowS
ListPolicyGenerationsResponse -> String
(Int -> ListPolicyGenerationsResponse -> ShowS)
-> (ListPolicyGenerationsResponse -> String)
-> ([ListPolicyGenerationsResponse] -> ShowS)
-> Show ListPolicyGenerationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPolicyGenerationsResponse] -> ShowS
$cshowList :: [ListPolicyGenerationsResponse] -> ShowS
show :: ListPolicyGenerationsResponse -> String
$cshow :: ListPolicyGenerationsResponse -> String
showsPrec :: Int -> ListPolicyGenerationsResponse -> ShowS
$cshowsPrec :: Int -> ListPolicyGenerationsResponse -> ShowS
Prelude.Show, (forall x.
ListPolicyGenerationsResponse
-> Rep ListPolicyGenerationsResponse x)
-> (forall x.
Rep ListPolicyGenerationsResponse x
-> ListPolicyGenerationsResponse)
-> Generic ListPolicyGenerationsResponse
forall x.
Rep ListPolicyGenerationsResponse x
-> ListPolicyGenerationsResponse
forall x.
ListPolicyGenerationsResponse
-> Rep ListPolicyGenerationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListPolicyGenerationsResponse x
-> ListPolicyGenerationsResponse
$cfrom :: forall x.
ListPolicyGenerationsResponse
-> Rep ListPolicyGenerationsResponse x
Prelude.Generic)
newListPolicyGenerationsResponse ::
Prelude.Int ->
ListPolicyGenerationsResponse
newListPolicyGenerationsResponse :: Int -> ListPolicyGenerationsResponse
newListPolicyGenerationsResponse Int
pHttpStatus_ =
ListPolicyGenerationsResponse' :: Maybe Text
-> Int -> [PolicyGeneration] -> ListPolicyGenerationsResponse
ListPolicyGenerationsResponse'
{ $sel:nextToken:ListPolicyGenerationsResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListPolicyGenerationsResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:policyGenerations:ListPolicyGenerationsResponse' :: [PolicyGeneration]
policyGenerations = [PolicyGeneration]
forall a. Monoid a => a
Prelude.mempty
}
listPolicyGenerationsResponse_nextToken :: Lens.Lens' ListPolicyGenerationsResponse (Prelude.Maybe Prelude.Text)
listPolicyGenerationsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPolicyGenerationsResponse -> f ListPolicyGenerationsResponse
listPolicyGenerationsResponse_nextToken = (ListPolicyGenerationsResponse -> Maybe Text)
-> (ListPolicyGenerationsResponse
-> Maybe Text -> ListPolicyGenerationsResponse)
-> Lens' ListPolicyGenerationsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicyGenerationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPolicyGenerationsResponse' :: ListPolicyGenerationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPolicyGenerationsResponse
s@ListPolicyGenerationsResponse' {} Maybe Text
a -> ListPolicyGenerationsResponse
s {$sel:nextToken:ListPolicyGenerationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListPolicyGenerationsResponse)
listPolicyGenerationsResponse_httpStatus :: Lens.Lens' ListPolicyGenerationsResponse Prelude.Int
listPolicyGenerationsResponse_httpStatus :: (Int -> f Int)
-> ListPolicyGenerationsResponse -> f ListPolicyGenerationsResponse
listPolicyGenerationsResponse_httpStatus = (ListPolicyGenerationsResponse -> Int)
-> (ListPolicyGenerationsResponse
-> Int -> ListPolicyGenerationsResponse)
-> Lens
ListPolicyGenerationsResponse ListPolicyGenerationsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicyGenerationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListPolicyGenerationsResponse' :: ListPolicyGenerationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListPolicyGenerationsResponse
s@ListPolicyGenerationsResponse' {} Int
a -> ListPolicyGenerationsResponse
s {$sel:httpStatus:ListPolicyGenerationsResponse' :: Int
httpStatus = Int
a} :: ListPolicyGenerationsResponse)
listPolicyGenerationsResponse_policyGenerations :: Lens.Lens' ListPolicyGenerationsResponse [PolicyGeneration]
listPolicyGenerationsResponse_policyGenerations :: ([PolicyGeneration] -> f [PolicyGeneration])
-> ListPolicyGenerationsResponse -> f ListPolicyGenerationsResponse
listPolicyGenerationsResponse_policyGenerations = (ListPolicyGenerationsResponse -> [PolicyGeneration])
-> (ListPolicyGenerationsResponse
-> [PolicyGeneration] -> ListPolicyGenerationsResponse)
-> Lens' ListPolicyGenerationsResponse [PolicyGeneration]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPolicyGenerationsResponse' {[PolicyGeneration]
policyGenerations :: [PolicyGeneration]
$sel:policyGenerations:ListPolicyGenerationsResponse' :: ListPolicyGenerationsResponse -> [PolicyGeneration]
policyGenerations} -> [PolicyGeneration]
policyGenerations) (\s :: ListPolicyGenerationsResponse
s@ListPolicyGenerationsResponse' {} [PolicyGeneration]
a -> ListPolicyGenerationsResponse
s {$sel:policyGenerations:ListPolicyGenerationsResponse' :: [PolicyGeneration]
policyGenerations = [PolicyGeneration]
a} :: ListPolicyGenerationsResponse) (([PolicyGeneration] -> f [PolicyGeneration])
-> ListPolicyGenerationsResponse
-> f ListPolicyGenerationsResponse)
-> (([PolicyGeneration] -> f [PolicyGeneration])
-> [PolicyGeneration] -> f [PolicyGeneration])
-> ([PolicyGeneration] -> f [PolicyGeneration])
-> ListPolicyGenerationsResponse
-> f ListPolicyGenerationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([PolicyGeneration] -> f [PolicyGeneration])
-> [PolicyGeneration] -> f [PolicyGeneration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.NFData ListPolicyGenerationsResponse