{-# 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.IoT.ListAttachedPolicies
(
ListAttachedPolicies (..),
newListAttachedPolicies,
listAttachedPolicies_marker,
listAttachedPolicies_recursive,
listAttachedPolicies_pageSize,
listAttachedPolicies_target,
ListAttachedPoliciesResponse (..),
newListAttachedPoliciesResponse,
listAttachedPoliciesResponse_nextMarker,
listAttachedPoliciesResponse_policies,
listAttachedPoliciesResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IoT.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 ListAttachedPolicies = ListAttachedPolicies'
{
ListAttachedPolicies -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
ListAttachedPolicies -> Maybe Bool
recursive :: Prelude.Maybe Prelude.Bool,
ListAttachedPolicies -> Maybe Natural
pageSize :: Prelude.Maybe Prelude.Natural,
ListAttachedPolicies -> Text
target :: Prelude.Text
}
deriving (ListAttachedPolicies -> ListAttachedPolicies -> Bool
(ListAttachedPolicies -> ListAttachedPolicies -> Bool)
-> (ListAttachedPolicies -> ListAttachedPolicies -> Bool)
-> Eq ListAttachedPolicies
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAttachedPolicies -> ListAttachedPolicies -> Bool
$c/= :: ListAttachedPolicies -> ListAttachedPolicies -> Bool
== :: ListAttachedPolicies -> ListAttachedPolicies -> Bool
$c== :: ListAttachedPolicies -> ListAttachedPolicies -> Bool
Prelude.Eq, ReadPrec [ListAttachedPolicies]
ReadPrec ListAttachedPolicies
Int -> ReadS ListAttachedPolicies
ReadS [ListAttachedPolicies]
(Int -> ReadS ListAttachedPolicies)
-> ReadS [ListAttachedPolicies]
-> ReadPrec ListAttachedPolicies
-> ReadPrec [ListAttachedPolicies]
-> Read ListAttachedPolicies
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAttachedPolicies]
$creadListPrec :: ReadPrec [ListAttachedPolicies]
readPrec :: ReadPrec ListAttachedPolicies
$creadPrec :: ReadPrec ListAttachedPolicies
readList :: ReadS [ListAttachedPolicies]
$creadList :: ReadS [ListAttachedPolicies]
readsPrec :: Int -> ReadS ListAttachedPolicies
$creadsPrec :: Int -> ReadS ListAttachedPolicies
Prelude.Read, Int -> ListAttachedPolicies -> ShowS
[ListAttachedPolicies] -> ShowS
ListAttachedPolicies -> String
(Int -> ListAttachedPolicies -> ShowS)
-> (ListAttachedPolicies -> String)
-> ([ListAttachedPolicies] -> ShowS)
-> Show ListAttachedPolicies
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAttachedPolicies] -> ShowS
$cshowList :: [ListAttachedPolicies] -> ShowS
show :: ListAttachedPolicies -> String
$cshow :: ListAttachedPolicies -> String
showsPrec :: Int -> ListAttachedPolicies -> ShowS
$cshowsPrec :: Int -> ListAttachedPolicies -> ShowS
Prelude.Show, (forall x. ListAttachedPolicies -> Rep ListAttachedPolicies x)
-> (forall x. Rep ListAttachedPolicies x -> ListAttachedPolicies)
-> Generic ListAttachedPolicies
forall x. Rep ListAttachedPolicies x -> ListAttachedPolicies
forall x. ListAttachedPolicies -> Rep ListAttachedPolicies x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListAttachedPolicies x -> ListAttachedPolicies
$cfrom :: forall x. ListAttachedPolicies -> Rep ListAttachedPolicies x
Prelude.Generic)
newListAttachedPolicies ::
Prelude.Text ->
ListAttachedPolicies
newListAttachedPolicies :: Text -> ListAttachedPolicies
newListAttachedPolicies Text
pTarget_ =
ListAttachedPolicies' :: Maybe Text
-> Maybe Bool -> Maybe Natural -> Text -> ListAttachedPolicies
ListAttachedPolicies'
{ $sel:marker:ListAttachedPolicies' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:recursive:ListAttachedPolicies' :: Maybe Bool
recursive = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:pageSize:ListAttachedPolicies' :: Maybe Natural
pageSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:target:ListAttachedPolicies' :: Text
target = Text
pTarget_
}
listAttachedPolicies_marker :: Lens.Lens' ListAttachedPolicies (Prelude.Maybe Prelude.Text)
listAttachedPolicies_marker :: (Maybe Text -> f (Maybe Text))
-> ListAttachedPolicies -> f ListAttachedPolicies
listAttachedPolicies_marker = (ListAttachedPolicies -> Maybe Text)
-> (ListAttachedPolicies -> Maybe Text -> ListAttachedPolicies)
-> Lens
ListAttachedPolicies ListAttachedPolicies (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttachedPolicies' {Maybe Text
marker :: Maybe Text
$sel:marker:ListAttachedPolicies' :: ListAttachedPolicies -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListAttachedPolicies
s@ListAttachedPolicies' {} Maybe Text
a -> ListAttachedPolicies
s {$sel:marker:ListAttachedPolicies' :: Maybe Text
marker = Maybe Text
a} :: ListAttachedPolicies)
listAttachedPolicies_recursive :: Lens.Lens' ListAttachedPolicies (Prelude.Maybe Prelude.Bool)
listAttachedPolicies_recursive :: (Maybe Bool -> f (Maybe Bool))
-> ListAttachedPolicies -> f ListAttachedPolicies
listAttachedPolicies_recursive = (ListAttachedPolicies -> Maybe Bool)
-> (ListAttachedPolicies -> Maybe Bool -> ListAttachedPolicies)
-> Lens
ListAttachedPolicies ListAttachedPolicies (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttachedPolicies' {Maybe Bool
recursive :: Maybe Bool
$sel:recursive:ListAttachedPolicies' :: ListAttachedPolicies -> Maybe Bool
recursive} -> Maybe Bool
recursive) (\s :: ListAttachedPolicies
s@ListAttachedPolicies' {} Maybe Bool
a -> ListAttachedPolicies
s {$sel:recursive:ListAttachedPolicies' :: Maybe Bool
recursive = Maybe Bool
a} :: ListAttachedPolicies)
listAttachedPolicies_pageSize :: Lens.Lens' ListAttachedPolicies (Prelude.Maybe Prelude.Natural)
listAttachedPolicies_pageSize :: (Maybe Natural -> f (Maybe Natural))
-> ListAttachedPolicies -> f ListAttachedPolicies
listAttachedPolicies_pageSize = (ListAttachedPolicies -> Maybe Natural)
-> (ListAttachedPolicies -> Maybe Natural -> ListAttachedPolicies)
-> Lens
ListAttachedPolicies
ListAttachedPolicies
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttachedPolicies' {Maybe Natural
pageSize :: Maybe Natural
$sel:pageSize:ListAttachedPolicies' :: ListAttachedPolicies -> Maybe Natural
pageSize} -> Maybe Natural
pageSize) (\s :: ListAttachedPolicies
s@ListAttachedPolicies' {} Maybe Natural
a -> ListAttachedPolicies
s {$sel:pageSize:ListAttachedPolicies' :: Maybe Natural
pageSize = Maybe Natural
a} :: ListAttachedPolicies)
listAttachedPolicies_target :: Lens.Lens' ListAttachedPolicies Prelude.Text
listAttachedPolicies_target :: (Text -> f Text) -> ListAttachedPolicies -> f ListAttachedPolicies
listAttachedPolicies_target = (ListAttachedPolicies -> Text)
-> (ListAttachedPolicies -> Text -> ListAttachedPolicies)
-> Lens ListAttachedPolicies ListAttachedPolicies Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttachedPolicies' {Text
target :: Text
$sel:target:ListAttachedPolicies' :: ListAttachedPolicies -> Text
target} -> Text
target) (\s :: ListAttachedPolicies
s@ListAttachedPolicies' {} Text
a -> ListAttachedPolicies
s {$sel:target:ListAttachedPolicies' :: Text
target = Text
a} :: ListAttachedPolicies)
instance Core.AWSPager ListAttachedPolicies where
page :: ListAttachedPolicies
-> AWSResponse ListAttachedPolicies -> Maybe ListAttachedPolicies
page ListAttachedPolicies
rq AWSResponse ListAttachedPolicies
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListAttachedPolicies
ListAttachedPoliciesResponse
rs
ListAttachedPoliciesResponse
-> Getting (First Text) ListAttachedPoliciesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListAttachedPoliciesResponse
-> Const (First Text) ListAttachedPoliciesResponse
Lens' ListAttachedPoliciesResponse (Maybe Text)
listAttachedPoliciesResponse_nextMarker
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListAttachedPoliciesResponse
-> Const (First Text) ListAttachedPoliciesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListAttachedPoliciesResponse 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 ListAttachedPolicies
forall a. Maybe a
Prelude.Nothing
| Maybe [Policy] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListAttachedPolicies
ListAttachedPoliciesResponse
rs
ListAttachedPoliciesResponse
-> Getting (First [Policy]) ListAttachedPoliciesResponse [Policy]
-> Maybe [Policy]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Policy] -> Const (First [Policy]) (Maybe [Policy]))
-> ListAttachedPoliciesResponse
-> Const (First [Policy]) ListAttachedPoliciesResponse
Lens' ListAttachedPoliciesResponse (Maybe [Policy])
listAttachedPoliciesResponse_policies
((Maybe [Policy] -> Const (First [Policy]) (Maybe [Policy]))
-> ListAttachedPoliciesResponse
-> Const (First [Policy]) ListAttachedPoliciesResponse)
-> (([Policy] -> Const (First [Policy]) [Policy])
-> Maybe [Policy] -> Const (First [Policy]) (Maybe [Policy]))
-> Getting (First [Policy]) ListAttachedPoliciesResponse [Policy]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Policy] -> Const (First [Policy]) [Policy])
-> Maybe [Policy] -> Const (First [Policy]) (Maybe [Policy])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListAttachedPolicies
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListAttachedPolicies -> Maybe ListAttachedPolicies
forall a. a -> Maybe a
Prelude.Just (ListAttachedPolicies -> Maybe ListAttachedPolicies)
-> ListAttachedPolicies -> Maybe ListAttachedPolicies
forall a b. (a -> b) -> a -> b
Prelude.$
ListAttachedPolicies
rq
ListAttachedPolicies
-> (ListAttachedPolicies -> ListAttachedPolicies)
-> ListAttachedPolicies
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListAttachedPolicies -> Identity ListAttachedPolicies
Lens
ListAttachedPolicies ListAttachedPolicies (Maybe Text) (Maybe Text)
listAttachedPolicies_marker
((Maybe Text -> Identity (Maybe Text))
-> ListAttachedPolicies -> Identity ListAttachedPolicies)
-> Maybe Text -> ListAttachedPolicies -> ListAttachedPolicies
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListAttachedPolicies
ListAttachedPoliciesResponse
rs
ListAttachedPoliciesResponse
-> Getting (First Text) ListAttachedPoliciesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListAttachedPoliciesResponse
-> Const (First Text) ListAttachedPoliciesResponse
Lens' ListAttachedPoliciesResponse (Maybe Text)
listAttachedPoliciesResponse_nextMarker
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListAttachedPoliciesResponse
-> Const (First Text) ListAttachedPoliciesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListAttachedPoliciesResponse 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 ListAttachedPolicies where
type
AWSResponse ListAttachedPolicies =
ListAttachedPoliciesResponse
request :: ListAttachedPolicies -> Request ListAttachedPolicies
request = Service -> ListAttachedPolicies -> Request ListAttachedPolicies
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListAttachedPolicies
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListAttachedPolicies)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListAttachedPolicies))
-> Logger
-> Service
-> Proxy ListAttachedPolicies
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListAttachedPolicies)))
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 -> Maybe [Policy] -> Int -> ListAttachedPoliciesResponse
ListAttachedPoliciesResponse'
(Maybe Text
-> Maybe [Policy] -> Int -> ListAttachedPoliciesResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe [Policy] -> Int -> ListAttachedPoliciesResponse)
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
"nextMarker")
Either
String (Maybe [Policy] -> Int -> ListAttachedPoliciesResponse)
-> Either String (Maybe [Policy])
-> Either String (Int -> ListAttachedPoliciesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Policy]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"policies" Either String (Maybe (Maybe [Policy]))
-> Maybe [Policy] -> Either String (Maybe [Policy])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Policy]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> ListAttachedPoliciesResponse)
-> Either String Int -> Either String ListAttachedPoliciesResponse
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 ListAttachedPolicies
instance Prelude.NFData ListAttachedPolicies
instance Core.ToHeaders ListAttachedPolicies where
toHeaders :: ListAttachedPolicies -> ResponseHeaders
toHeaders = ResponseHeaders -> ListAttachedPolicies -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON ListAttachedPolicies where
toJSON :: ListAttachedPolicies -> Value
toJSON = Value -> ListAttachedPolicies -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)
instance Core.ToPath ListAttachedPolicies where
toPath :: ListAttachedPolicies -> ByteString
toPath ListAttachedPolicies' {Maybe Bool
Maybe Natural
Maybe Text
Text
target :: Text
pageSize :: Maybe Natural
recursive :: Maybe Bool
marker :: Maybe Text
$sel:target:ListAttachedPolicies' :: ListAttachedPolicies -> Text
$sel:pageSize:ListAttachedPolicies' :: ListAttachedPolicies -> Maybe Natural
$sel:recursive:ListAttachedPolicies' :: ListAttachedPolicies -> Maybe Bool
$sel:marker:ListAttachedPolicies' :: ListAttachedPolicies -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/attached-policies/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
target]
instance Core.ToQuery ListAttachedPolicies where
toQuery :: ListAttachedPolicies -> QueryString
toQuery ListAttachedPolicies' {Maybe Bool
Maybe Natural
Maybe Text
Text
target :: Text
pageSize :: Maybe Natural
recursive :: Maybe Bool
marker :: Maybe Text
$sel:target:ListAttachedPolicies' :: ListAttachedPolicies -> Text
$sel:pageSize:ListAttachedPolicies' :: ListAttachedPolicies -> Maybe Natural
$sel:recursive:ListAttachedPolicies' :: ListAttachedPolicies -> Maybe Bool
$sel:marker:ListAttachedPolicies' :: ListAttachedPolicies -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
ByteString
"recursive" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
recursive,
ByteString
"pageSize" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
pageSize
]
data ListAttachedPoliciesResponse = ListAttachedPoliciesResponse'
{
ListAttachedPoliciesResponse -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
ListAttachedPoliciesResponse -> Maybe [Policy]
policies :: Prelude.Maybe [Policy],
ListAttachedPoliciesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListAttachedPoliciesResponse
-> ListAttachedPoliciesResponse -> Bool
(ListAttachedPoliciesResponse
-> ListAttachedPoliciesResponse -> Bool)
-> (ListAttachedPoliciesResponse
-> ListAttachedPoliciesResponse -> Bool)
-> Eq ListAttachedPoliciesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAttachedPoliciesResponse
-> ListAttachedPoliciesResponse -> Bool
$c/= :: ListAttachedPoliciesResponse
-> ListAttachedPoliciesResponse -> Bool
== :: ListAttachedPoliciesResponse
-> ListAttachedPoliciesResponse -> Bool
$c== :: ListAttachedPoliciesResponse
-> ListAttachedPoliciesResponse -> Bool
Prelude.Eq, ReadPrec [ListAttachedPoliciesResponse]
ReadPrec ListAttachedPoliciesResponse
Int -> ReadS ListAttachedPoliciesResponse
ReadS [ListAttachedPoliciesResponse]
(Int -> ReadS ListAttachedPoliciesResponse)
-> ReadS [ListAttachedPoliciesResponse]
-> ReadPrec ListAttachedPoliciesResponse
-> ReadPrec [ListAttachedPoliciesResponse]
-> Read ListAttachedPoliciesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAttachedPoliciesResponse]
$creadListPrec :: ReadPrec [ListAttachedPoliciesResponse]
readPrec :: ReadPrec ListAttachedPoliciesResponse
$creadPrec :: ReadPrec ListAttachedPoliciesResponse
readList :: ReadS [ListAttachedPoliciesResponse]
$creadList :: ReadS [ListAttachedPoliciesResponse]
readsPrec :: Int -> ReadS ListAttachedPoliciesResponse
$creadsPrec :: Int -> ReadS ListAttachedPoliciesResponse
Prelude.Read, Int -> ListAttachedPoliciesResponse -> ShowS
[ListAttachedPoliciesResponse] -> ShowS
ListAttachedPoliciesResponse -> String
(Int -> ListAttachedPoliciesResponse -> ShowS)
-> (ListAttachedPoliciesResponse -> String)
-> ([ListAttachedPoliciesResponse] -> ShowS)
-> Show ListAttachedPoliciesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAttachedPoliciesResponse] -> ShowS
$cshowList :: [ListAttachedPoliciesResponse] -> ShowS
show :: ListAttachedPoliciesResponse -> String
$cshow :: ListAttachedPoliciesResponse -> String
showsPrec :: Int -> ListAttachedPoliciesResponse -> ShowS
$cshowsPrec :: Int -> ListAttachedPoliciesResponse -> ShowS
Prelude.Show, (forall x.
ListAttachedPoliciesResponse -> Rep ListAttachedPoliciesResponse x)
-> (forall x.
Rep ListAttachedPoliciesResponse x -> ListAttachedPoliciesResponse)
-> Generic ListAttachedPoliciesResponse
forall x.
Rep ListAttachedPoliciesResponse x -> ListAttachedPoliciesResponse
forall x.
ListAttachedPoliciesResponse -> Rep ListAttachedPoliciesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAttachedPoliciesResponse x -> ListAttachedPoliciesResponse
$cfrom :: forall x.
ListAttachedPoliciesResponse -> Rep ListAttachedPoliciesResponse x
Prelude.Generic)
newListAttachedPoliciesResponse ::
Prelude.Int ->
ListAttachedPoliciesResponse
newListAttachedPoliciesResponse :: Int -> ListAttachedPoliciesResponse
newListAttachedPoliciesResponse Int
pHttpStatus_ =
ListAttachedPoliciesResponse' :: Maybe Text -> Maybe [Policy] -> Int -> ListAttachedPoliciesResponse
ListAttachedPoliciesResponse'
{ $sel:nextMarker:ListAttachedPoliciesResponse' :: Maybe Text
nextMarker =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:policies:ListAttachedPoliciesResponse' :: Maybe [Policy]
policies = Maybe [Policy]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListAttachedPoliciesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listAttachedPoliciesResponse_nextMarker :: Lens.Lens' ListAttachedPoliciesResponse (Prelude.Maybe Prelude.Text)
listAttachedPoliciesResponse_nextMarker :: (Maybe Text -> f (Maybe Text))
-> ListAttachedPoliciesResponse -> f ListAttachedPoliciesResponse
listAttachedPoliciesResponse_nextMarker = (ListAttachedPoliciesResponse -> Maybe Text)
-> (ListAttachedPoliciesResponse
-> Maybe Text -> ListAttachedPoliciesResponse)
-> Lens' ListAttachedPoliciesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttachedPoliciesResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListAttachedPoliciesResponse' :: ListAttachedPoliciesResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListAttachedPoliciesResponse
s@ListAttachedPoliciesResponse' {} Maybe Text
a -> ListAttachedPoliciesResponse
s {$sel:nextMarker:ListAttachedPoliciesResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: ListAttachedPoliciesResponse)
listAttachedPoliciesResponse_policies :: Lens.Lens' ListAttachedPoliciesResponse (Prelude.Maybe [Policy])
listAttachedPoliciesResponse_policies :: (Maybe [Policy] -> f (Maybe [Policy]))
-> ListAttachedPoliciesResponse -> f ListAttachedPoliciesResponse
listAttachedPoliciesResponse_policies = (ListAttachedPoliciesResponse -> Maybe [Policy])
-> (ListAttachedPoliciesResponse
-> Maybe [Policy] -> ListAttachedPoliciesResponse)
-> Lens' ListAttachedPoliciesResponse (Maybe [Policy])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttachedPoliciesResponse' {Maybe [Policy]
policies :: Maybe [Policy]
$sel:policies:ListAttachedPoliciesResponse' :: ListAttachedPoliciesResponse -> Maybe [Policy]
policies} -> Maybe [Policy]
policies) (\s :: ListAttachedPoliciesResponse
s@ListAttachedPoliciesResponse' {} Maybe [Policy]
a -> ListAttachedPoliciesResponse
s {$sel:policies:ListAttachedPoliciesResponse' :: Maybe [Policy]
policies = Maybe [Policy]
a} :: ListAttachedPoliciesResponse) ((Maybe [Policy] -> f (Maybe [Policy]))
-> ListAttachedPoliciesResponse -> f ListAttachedPoliciesResponse)
-> ((Maybe [Policy] -> f (Maybe [Policy]))
-> Maybe [Policy] -> f (Maybe [Policy]))
-> (Maybe [Policy] -> f (Maybe [Policy]))
-> ListAttachedPoliciesResponse
-> f ListAttachedPoliciesResponse
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
listAttachedPoliciesResponse_httpStatus :: Lens.Lens' ListAttachedPoliciesResponse Prelude.Int
listAttachedPoliciesResponse_httpStatus :: (Int -> f Int)
-> ListAttachedPoliciesResponse -> f ListAttachedPoliciesResponse
listAttachedPoliciesResponse_httpStatus = (ListAttachedPoliciesResponse -> Int)
-> (ListAttachedPoliciesResponse
-> Int -> ListAttachedPoliciesResponse)
-> Lens
ListAttachedPoliciesResponse ListAttachedPoliciesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttachedPoliciesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListAttachedPoliciesResponse' :: ListAttachedPoliciesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListAttachedPoliciesResponse
s@ListAttachedPoliciesResponse' {} Int
a -> ListAttachedPoliciesResponse
s {$sel:httpStatus:ListAttachedPoliciesResponse' :: Int
httpStatus = Int
a} :: ListAttachedPoliciesResponse)
instance Prelude.NFData ListAttachedPoliciesResponse