{-# 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.SSMIncidents.GetResourcePolicies
(
GetResourcePolicies (..),
newGetResourcePolicies,
getResourcePolicies_nextToken,
getResourcePolicies_maxResults,
getResourcePolicies_resourceArn,
GetResourcePoliciesResponse (..),
newGetResourcePoliciesResponse,
getResourcePoliciesResponse_nextToken,
getResourcePoliciesResponse_httpStatus,
getResourcePoliciesResponse_resourcePolicies,
)
where
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
import Amazonka.SSMIncidents.Types
data GetResourcePolicies = GetResourcePolicies'
{
GetResourcePolicies -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetResourcePolicies -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
GetResourcePolicies -> Text
resourceArn :: Prelude.Text
}
deriving (GetResourcePolicies -> GetResourcePolicies -> Bool
(GetResourcePolicies -> GetResourcePolicies -> Bool)
-> (GetResourcePolicies -> GetResourcePolicies -> Bool)
-> Eq GetResourcePolicies
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetResourcePolicies -> GetResourcePolicies -> Bool
$c/= :: GetResourcePolicies -> GetResourcePolicies -> Bool
== :: GetResourcePolicies -> GetResourcePolicies -> Bool
$c== :: GetResourcePolicies -> GetResourcePolicies -> Bool
Prelude.Eq, ReadPrec [GetResourcePolicies]
ReadPrec GetResourcePolicies
Int -> ReadS GetResourcePolicies
ReadS [GetResourcePolicies]
(Int -> ReadS GetResourcePolicies)
-> ReadS [GetResourcePolicies]
-> ReadPrec GetResourcePolicies
-> ReadPrec [GetResourcePolicies]
-> Read GetResourcePolicies
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetResourcePolicies]
$creadListPrec :: ReadPrec [GetResourcePolicies]
readPrec :: ReadPrec GetResourcePolicies
$creadPrec :: ReadPrec GetResourcePolicies
readList :: ReadS [GetResourcePolicies]
$creadList :: ReadS [GetResourcePolicies]
readsPrec :: Int -> ReadS GetResourcePolicies
$creadsPrec :: Int -> ReadS GetResourcePolicies
Prelude.Read, Int -> GetResourcePolicies -> ShowS
[GetResourcePolicies] -> ShowS
GetResourcePolicies -> String
(Int -> GetResourcePolicies -> ShowS)
-> (GetResourcePolicies -> String)
-> ([GetResourcePolicies] -> ShowS)
-> Show GetResourcePolicies
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetResourcePolicies] -> ShowS
$cshowList :: [GetResourcePolicies] -> ShowS
show :: GetResourcePolicies -> String
$cshow :: GetResourcePolicies -> String
showsPrec :: Int -> GetResourcePolicies -> ShowS
$cshowsPrec :: Int -> GetResourcePolicies -> ShowS
Prelude.Show, (forall x. GetResourcePolicies -> Rep GetResourcePolicies x)
-> (forall x. Rep GetResourcePolicies x -> GetResourcePolicies)
-> Generic GetResourcePolicies
forall x. Rep GetResourcePolicies x -> GetResourcePolicies
forall x. GetResourcePolicies -> Rep GetResourcePolicies x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetResourcePolicies x -> GetResourcePolicies
$cfrom :: forall x. GetResourcePolicies -> Rep GetResourcePolicies x
Prelude.Generic)
newGetResourcePolicies ::
Prelude.Text ->
GetResourcePolicies
newGetResourcePolicies :: Text -> GetResourcePolicies
newGetResourcePolicies Text
pResourceArn_ =
GetResourcePolicies' :: Maybe Text -> Maybe Natural -> Text -> GetResourcePolicies
GetResourcePolicies'
{ $sel:nextToken:GetResourcePolicies' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetResourcePolicies' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:resourceArn:GetResourcePolicies' :: Text
resourceArn = Text
pResourceArn_
}
getResourcePolicies_nextToken :: Lens.Lens' GetResourcePolicies (Prelude.Maybe Prelude.Text)
getResourcePolicies_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetResourcePolicies -> f GetResourcePolicies
getResourcePolicies_nextToken = (GetResourcePolicies -> Maybe Text)
-> (GetResourcePolicies -> Maybe Text -> GetResourcePolicies)
-> Lens
GetResourcePolicies GetResourcePolicies (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourcePolicies' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetResourcePolicies' :: GetResourcePolicies -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetResourcePolicies
s@GetResourcePolicies' {} Maybe Text
a -> GetResourcePolicies
s {$sel:nextToken:GetResourcePolicies' :: Maybe Text
nextToken = Maybe Text
a} :: GetResourcePolicies)
getResourcePolicies_maxResults :: Lens.Lens' GetResourcePolicies (Prelude.Maybe Prelude.Natural)
getResourcePolicies_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> GetResourcePolicies -> f GetResourcePolicies
getResourcePolicies_maxResults = (GetResourcePolicies -> Maybe Natural)
-> (GetResourcePolicies -> Maybe Natural -> GetResourcePolicies)
-> Lens
GetResourcePolicies
GetResourcePolicies
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourcePolicies' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetResourcePolicies' :: GetResourcePolicies -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetResourcePolicies
s@GetResourcePolicies' {} Maybe Natural
a -> GetResourcePolicies
s {$sel:maxResults:GetResourcePolicies' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetResourcePolicies)
getResourcePolicies_resourceArn :: Lens.Lens' GetResourcePolicies Prelude.Text
getResourcePolicies_resourceArn :: (Text -> f Text) -> GetResourcePolicies -> f GetResourcePolicies
getResourcePolicies_resourceArn = (GetResourcePolicies -> Text)
-> (GetResourcePolicies -> Text -> GetResourcePolicies)
-> Lens GetResourcePolicies GetResourcePolicies Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourcePolicies' {Text
resourceArn :: Text
$sel:resourceArn:GetResourcePolicies' :: GetResourcePolicies -> Text
resourceArn} -> Text
resourceArn) (\s :: GetResourcePolicies
s@GetResourcePolicies' {} Text
a -> GetResourcePolicies
s {$sel:resourceArn:GetResourcePolicies' :: Text
resourceArn = Text
a} :: GetResourcePolicies)
instance Core.AWSPager GetResourcePolicies where
page :: GetResourcePolicies
-> AWSResponse GetResourcePolicies -> Maybe GetResourcePolicies
page GetResourcePolicies
rq AWSResponse GetResourcePolicies
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetResourcePolicies
GetResourcePoliciesResponse
rs
GetResourcePoliciesResponse
-> Getting (First Text) GetResourcePoliciesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetResourcePoliciesResponse
-> Const (First Text) GetResourcePoliciesResponse
Lens' GetResourcePoliciesResponse (Maybe Text)
getResourcePoliciesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetResourcePoliciesResponse
-> Const (First Text) GetResourcePoliciesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetResourcePoliciesResponse 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 GetResourcePolicies
forall a. Maybe a
Prelude.Nothing
| [ResourcePolicy] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetResourcePolicies
GetResourcePoliciesResponse
rs
GetResourcePoliciesResponse
-> Getting
[ResourcePolicy] GetResourcePoliciesResponse [ResourcePolicy]
-> [ResourcePolicy]
forall s a. s -> Getting a s a -> a
Lens.^. Getting
[ResourcePolicy] GetResourcePoliciesResponse [ResourcePolicy]
Lens' GetResourcePoliciesResponse [ResourcePolicy]
getResourcePoliciesResponse_resourcePolicies
) =
Maybe GetResourcePolicies
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
GetResourcePolicies -> Maybe GetResourcePolicies
forall a. a -> Maybe a
Prelude.Just (GetResourcePolicies -> Maybe GetResourcePolicies)
-> GetResourcePolicies -> Maybe GetResourcePolicies
forall a b. (a -> b) -> a -> b
Prelude.$
GetResourcePolicies
rq
GetResourcePolicies
-> (GetResourcePolicies -> GetResourcePolicies)
-> GetResourcePolicies
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetResourcePolicies -> Identity GetResourcePolicies
Lens
GetResourcePolicies GetResourcePolicies (Maybe Text) (Maybe Text)
getResourcePolicies_nextToken
((Maybe Text -> Identity (Maybe Text))
-> GetResourcePolicies -> Identity GetResourcePolicies)
-> Maybe Text -> GetResourcePolicies -> GetResourcePolicies
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetResourcePolicies
GetResourcePoliciesResponse
rs
GetResourcePoliciesResponse
-> Getting (First Text) GetResourcePoliciesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetResourcePoliciesResponse
-> Const (First Text) GetResourcePoliciesResponse
Lens' GetResourcePoliciesResponse (Maybe Text)
getResourcePoliciesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetResourcePoliciesResponse
-> Const (First Text) GetResourcePoliciesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetResourcePoliciesResponse 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 GetResourcePolicies where
type
AWSResponse GetResourcePolicies =
GetResourcePoliciesResponse
request :: GetResourcePolicies -> Request GetResourcePolicies
request = Service -> GetResourcePolicies -> Request GetResourcePolicies
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetResourcePolicies
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetResourcePolicies)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetResourcePolicies))
-> Logger
-> Service
-> Proxy GetResourcePolicies
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetResourcePolicies)))
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 -> [ResourcePolicy] -> GetResourcePoliciesResponse
GetResourcePoliciesResponse'
(Maybe Text
-> Int -> [ResourcePolicy] -> GetResourcePoliciesResponse)
-> Either String (Maybe Text)
-> Either
String (Int -> [ResourcePolicy] -> GetResourcePoliciesResponse)
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 -> [ResourcePolicy] -> GetResourcePoliciesResponse)
-> Either String Int
-> Either String ([ResourcePolicy] -> GetResourcePoliciesResponse)
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 ([ResourcePolicy] -> GetResourcePoliciesResponse)
-> Either String [ResourcePolicy]
-> Either String GetResourcePoliciesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe [ResourcePolicy])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"resourcePolicies"
Either String (Maybe [ResourcePolicy])
-> [ResourcePolicy] -> Either String [ResourcePolicy]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [ResourcePolicy]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable GetResourcePolicies
instance Prelude.NFData GetResourcePolicies
instance Core.ToHeaders GetResourcePolicies where
toHeaders :: GetResourcePolicies -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetResourcePolicies -> 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.ToJSON GetResourcePolicies where
toJSON :: GetResourcePolicies -> Value
toJSON GetResourcePolicies' {Maybe Natural
Maybe Text
Text
resourceArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:resourceArn:GetResourcePolicies' :: GetResourcePolicies -> Text
$sel:maxResults:GetResourcePolicies' :: GetResourcePolicies -> Maybe Natural
$sel:nextToken:GetResourcePolicies' :: GetResourcePolicies -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"nextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
(Text
"maxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
]
)
instance Core.ToPath GetResourcePolicies where
toPath :: GetResourcePolicies -> ByteString
toPath = ByteString -> GetResourcePolicies -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/getResourcePolicies"
instance Core.ToQuery GetResourcePolicies where
toQuery :: GetResourcePolicies -> QueryString
toQuery GetResourcePolicies' {Maybe Natural
Maybe Text
Text
resourceArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:resourceArn:GetResourcePolicies' :: GetResourcePolicies -> Text
$sel:maxResults:GetResourcePolicies' :: GetResourcePolicies -> Maybe Natural
$sel:nextToken:GetResourcePolicies' :: GetResourcePolicies -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"resourceArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
resourceArn]
data GetResourcePoliciesResponse = GetResourcePoliciesResponse'
{
GetResourcePoliciesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetResourcePoliciesResponse -> Int
httpStatus :: Prelude.Int,
GetResourcePoliciesResponse -> [ResourcePolicy]
resourcePolicies :: [ResourcePolicy]
}
deriving (GetResourcePoliciesResponse -> GetResourcePoliciesResponse -> Bool
(GetResourcePoliciesResponse
-> GetResourcePoliciesResponse -> Bool)
-> (GetResourcePoliciesResponse
-> GetResourcePoliciesResponse -> Bool)
-> Eq GetResourcePoliciesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetResourcePoliciesResponse -> GetResourcePoliciesResponse -> Bool
$c/= :: GetResourcePoliciesResponse -> GetResourcePoliciesResponse -> Bool
== :: GetResourcePoliciesResponse -> GetResourcePoliciesResponse -> Bool
$c== :: GetResourcePoliciesResponse -> GetResourcePoliciesResponse -> Bool
Prelude.Eq, ReadPrec [GetResourcePoliciesResponse]
ReadPrec GetResourcePoliciesResponse
Int -> ReadS GetResourcePoliciesResponse
ReadS [GetResourcePoliciesResponse]
(Int -> ReadS GetResourcePoliciesResponse)
-> ReadS [GetResourcePoliciesResponse]
-> ReadPrec GetResourcePoliciesResponse
-> ReadPrec [GetResourcePoliciesResponse]
-> Read GetResourcePoliciesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetResourcePoliciesResponse]
$creadListPrec :: ReadPrec [GetResourcePoliciesResponse]
readPrec :: ReadPrec GetResourcePoliciesResponse
$creadPrec :: ReadPrec GetResourcePoliciesResponse
readList :: ReadS [GetResourcePoliciesResponse]
$creadList :: ReadS [GetResourcePoliciesResponse]
readsPrec :: Int -> ReadS GetResourcePoliciesResponse
$creadsPrec :: Int -> ReadS GetResourcePoliciesResponse
Prelude.Read, Int -> GetResourcePoliciesResponse -> ShowS
[GetResourcePoliciesResponse] -> ShowS
GetResourcePoliciesResponse -> String
(Int -> GetResourcePoliciesResponse -> ShowS)
-> (GetResourcePoliciesResponse -> String)
-> ([GetResourcePoliciesResponse] -> ShowS)
-> Show GetResourcePoliciesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetResourcePoliciesResponse] -> ShowS
$cshowList :: [GetResourcePoliciesResponse] -> ShowS
show :: GetResourcePoliciesResponse -> String
$cshow :: GetResourcePoliciesResponse -> String
showsPrec :: Int -> GetResourcePoliciesResponse -> ShowS
$cshowsPrec :: Int -> GetResourcePoliciesResponse -> ShowS
Prelude.Show, (forall x.
GetResourcePoliciesResponse -> Rep GetResourcePoliciesResponse x)
-> (forall x.
Rep GetResourcePoliciesResponse x -> GetResourcePoliciesResponse)
-> Generic GetResourcePoliciesResponse
forall x.
Rep GetResourcePoliciesResponse x -> GetResourcePoliciesResponse
forall x.
GetResourcePoliciesResponse -> Rep GetResourcePoliciesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetResourcePoliciesResponse x -> GetResourcePoliciesResponse
$cfrom :: forall x.
GetResourcePoliciesResponse -> Rep GetResourcePoliciesResponse x
Prelude.Generic)
newGetResourcePoliciesResponse ::
Prelude.Int ->
GetResourcePoliciesResponse
newGetResourcePoliciesResponse :: Int -> GetResourcePoliciesResponse
newGetResourcePoliciesResponse Int
pHttpStatus_ =
GetResourcePoliciesResponse' :: Maybe Text
-> Int -> [ResourcePolicy] -> GetResourcePoliciesResponse
GetResourcePoliciesResponse'
{ $sel:nextToken:GetResourcePoliciesResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetResourcePoliciesResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:resourcePolicies:GetResourcePoliciesResponse' :: [ResourcePolicy]
resourcePolicies = [ResourcePolicy]
forall a. Monoid a => a
Prelude.mempty
}
getResourcePoliciesResponse_nextToken :: Lens.Lens' GetResourcePoliciesResponse (Prelude.Maybe Prelude.Text)
getResourcePoliciesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetResourcePoliciesResponse -> f GetResourcePoliciesResponse
getResourcePoliciesResponse_nextToken = (GetResourcePoliciesResponse -> Maybe Text)
-> (GetResourcePoliciesResponse
-> Maybe Text -> GetResourcePoliciesResponse)
-> Lens' GetResourcePoliciesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourcePoliciesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetResourcePoliciesResponse' :: GetResourcePoliciesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetResourcePoliciesResponse
s@GetResourcePoliciesResponse' {} Maybe Text
a -> GetResourcePoliciesResponse
s {$sel:nextToken:GetResourcePoliciesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetResourcePoliciesResponse)
getResourcePoliciesResponse_httpStatus :: Lens.Lens' GetResourcePoliciesResponse Prelude.Int
getResourcePoliciesResponse_httpStatus :: (Int -> f Int)
-> GetResourcePoliciesResponse -> f GetResourcePoliciesResponse
getResourcePoliciesResponse_httpStatus = (GetResourcePoliciesResponse -> Int)
-> (GetResourcePoliciesResponse
-> Int -> GetResourcePoliciesResponse)
-> Lens
GetResourcePoliciesResponse GetResourcePoliciesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourcePoliciesResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetResourcePoliciesResponse' :: GetResourcePoliciesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetResourcePoliciesResponse
s@GetResourcePoliciesResponse' {} Int
a -> GetResourcePoliciesResponse
s {$sel:httpStatus:GetResourcePoliciesResponse' :: Int
httpStatus = Int
a} :: GetResourcePoliciesResponse)
getResourcePoliciesResponse_resourcePolicies :: Lens.Lens' GetResourcePoliciesResponse [ResourcePolicy]
getResourcePoliciesResponse_resourcePolicies :: ([ResourcePolicy] -> f [ResourcePolicy])
-> GetResourcePoliciesResponse -> f GetResourcePoliciesResponse
getResourcePoliciesResponse_resourcePolicies = (GetResourcePoliciesResponse -> [ResourcePolicy])
-> (GetResourcePoliciesResponse
-> [ResourcePolicy] -> GetResourcePoliciesResponse)
-> Lens' GetResourcePoliciesResponse [ResourcePolicy]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourcePoliciesResponse' {[ResourcePolicy]
resourcePolicies :: [ResourcePolicy]
$sel:resourcePolicies:GetResourcePoliciesResponse' :: GetResourcePoliciesResponse -> [ResourcePolicy]
resourcePolicies} -> [ResourcePolicy]
resourcePolicies) (\s :: GetResourcePoliciesResponse
s@GetResourcePoliciesResponse' {} [ResourcePolicy]
a -> GetResourcePoliciesResponse
s {$sel:resourcePolicies:GetResourcePoliciesResponse' :: [ResourcePolicy]
resourcePolicies = [ResourcePolicy]
a} :: GetResourcePoliciesResponse) (([ResourcePolicy] -> f [ResourcePolicy])
-> GetResourcePoliciesResponse -> f GetResourcePoliciesResponse)
-> (([ResourcePolicy] -> f [ResourcePolicy])
-> [ResourcePolicy] -> f [ResourcePolicy])
-> ([ResourcePolicy] -> f [ResourcePolicy])
-> GetResourcePoliciesResponse
-> f GetResourcePoliciesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ResourcePolicy] -> f [ResourcePolicy])
-> [ResourcePolicy] -> f [ResourcePolicy]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.NFData GetResourcePoliciesResponse