{-# 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.AuditManager.ListAssessmentFrameworks
(
ListAssessmentFrameworks (..),
newListAssessmentFrameworks,
listAssessmentFrameworks_maxResults,
listAssessmentFrameworks_nextToken,
listAssessmentFrameworks_frameworkType,
ListAssessmentFrameworksResponse (..),
newListAssessmentFrameworksResponse,
listAssessmentFrameworksResponse_frameworkMetadataList,
listAssessmentFrameworksResponse_nextToken,
listAssessmentFrameworksResponse_httpStatus,
)
where
import Amazonka.AuditManager.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListAssessmentFrameworks = ListAssessmentFrameworks'
{
ListAssessmentFrameworks -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListAssessmentFrameworks -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListAssessmentFrameworks -> FrameworkType
frameworkType :: FrameworkType
}
deriving (ListAssessmentFrameworks -> ListAssessmentFrameworks -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAssessmentFrameworks -> ListAssessmentFrameworks -> Bool
$c/= :: ListAssessmentFrameworks -> ListAssessmentFrameworks -> Bool
== :: ListAssessmentFrameworks -> ListAssessmentFrameworks -> Bool
$c== :: ListAssessmentFrameworks -> ListAssessmentFrameworks -> Bool
Prelude.Eq, ReadPrec [ListAssessmentFrameworks]
ReadPrec ListAssessmentFrameworks
Int -> ReadS ListAssessmentFrameworks
ReadS [ListAssessmentFrameworks]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAssessmentFrameworks]
$creadListPrec :: ReadPrec [ListAssessmentFrameworks]
readPrec :: ReadPrec ListAssessmentFrameworks
$creadPrec :: ReadPrec ListAssessmentFrameworks
readList :: ReadS [ListAssessmentFrameworks]
$creadList :: ReadS [ListAssessmentFrameworks]
readsPrec :: Int -> ReadS ListAssessmentFrameworks
$creadsPrec :: Int -> ReadS ListAssessmentFrameworks
Prelude.Read, Int -> ListAssessmentFrameworks -> ShowS
[ListAssessmentFrameworks] -> ShowS
ListAssessmentFrameworks -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAssessmentFrameworks] -> ShowS
$cshowList :: [ListAssessmentFrameworks] -> ShowS
show :: ListAssessmentFrameworks -> String
$cshow :: ListAssessmentFrameworks -> String
showsPrec :: Int -> ListAssessmentFrameworks -> ShowS
$cshowsPrec :: Int -> ListAssessmentFrameworks -> ShowS
Prelude.Show, forall x.
Rep ListAssessmentFrameworks x -> ListAssessmentFrameworks
forall x.
ListAssessmentFrameworks -> Rep ListAssessmentFrameworks x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAssessmentFrameworks x -> ListAssessmentFrameworks
$cfrom :: forall x.
ListAssessmentFrameworks -> Rep ListAssessmentFrameworks x
Prelude.Generic)
newListAssessmentFrameworks ::
FrameworkType ->
ListAssessmentFrameworks
newListAssessmentFrameworks :: FrameworkType -> ListAssessmentFrameworks
newListAssessmentFrameworks FrameworkType
pFrameworkType_ =
ListAssessmentFrameworks'
{ $sel:maxResults:ListAssessmentFrameworks' :: Maybe Natural
maxResults =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListAssessmentFrameworks' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:frameworkType:ListAssessmentFrameworks' :: FrameworkType
frameworkType = FrameworkType
pFrameworkType_
}
listAssessmentFrameworks_maxResults :: Lens.Lens' ListAssessmentFrameworks (Prelude.Maybe Prelude.Natural)
listAssessmentFrameworks_maxResults :: Lens' ListAssessmentFrameworks (Maybe Natural)
listAssessmentFrameworks_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAssessmentFrameworks' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListAssessmentFrameworks' :: ListAssessmentFrameworks -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListAssessmentFrameworks
s@ListAssessmentFrameworks' {} Maybe Natural
a -> ListAssessmentFrameworks
s {$sel:maxResults:ListAssessmentFrameworks' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListAssessmentFrameworks)
listAssessmentFrameworks_nextToken :: Lens.Lens' ListAssessmentFrameworks (Prelude.Maybe Prelude.Text)
listAssessmentFrameworks_nextToken :: Lens' ListAssessmentFrameworks (Maybe Text)
listAssessmentFrameworks_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAssessmentFrameworks' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAssessmentFrameworks' :: ListAssessmentFrameworks -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAssessmentFrameworks
s@ListAssessmentFrameworks' {} Maybe Text
a -> ListAssessmentFrameworks
s {$sel:nextToken:ListAssessmentFrameworks' :: Maybe Text
nextToken = Maybe Text
a} :: ListAssessmentFrameworks)
listAssessmentFrameworks_frameworkType :: Lens.Lens' ListAssessmentFrameworks FrameworkType
listAssessmentFrameworks_frameworkType :: Lens' ListAssessmentFrameworks FrameworkType
listAssessmentFrameworks_frameworkType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAssessmentFrameworks' {FrameworkType
frameworkType :: FrameworkType
$sel:frameworkType:ListAssessmentFrameworks' :: ListAssessmentFrameworks -> FrameworkType
frameworkType} -> FrameworkType
frameworkType) (\s :: ListAssessmentFrameworks
s@ListAssessmentFrameworks' {} FrameworkType
a -> ListAssessmentFrameworks
s {$sel:frameworkType:ListAssessmentFrameworks' :: FrameworkType
frameworkType = FrameworkType
a} :: ListAssessmentFrameworks)
instance Core.AWSRequest ListAssessmentFrameworks where
type
AWSResponse ListAssessmentFrameworks =
ListAssessmentFrameworksResponse
request :: (Service -> Service)
-> ListAssessmentFrameworks -> Request ListAssessmentFrameworks
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListAssessmentFrameworks
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListAssessmentFrameworks)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe [AssessmentFrameworkMetadata]
-> Maybe Text -> Int -> ListAssessmentFrameworksResponse
ListAssessmentFrameworksResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"frameworkMetadataList"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nextToken")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable ListAssessmentFrameworks where
hashWithSalt :: Int -> ListAssessmentFrameworks -> Int
hashWithSalt Int
_salt ListAssessmentFrameworks' {Maybe Natural
Maybe Text
FrameworkType
frameworkType :: FrameworkType
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:frameworkType:ListAssessmentFrameworks' :: ListAssessmentFrameworks -> FrameworkType
$sel:nextToken:ListAssessmentFrameworks' :: ListAssessmentFrameworks -> Maybe Text
$sel:maxResults:ListAssessmentFrameworks' :: ListAssessmentFrameworks -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` FrameworkType
frameworkType
instance Prelude.NFData ListAssessmentFrameworks where
rnf :: ListAssessmentFrameworks -> ()
rnf ListAssessmentFrameworks' {Maybe Natural
Maybe Text
FrameworkType
frameworkType :: FrameworkType
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:frameworkType:ListAssessmentFrameworks' :: ListAssessmentFrameworks -> FrameworkType
$sel:nextToken:ListAssessmentFrameworks' :: ListAssessmentFrameworks -> Maybe Text
$sel:maxResults:ListAssessmentFrameworks' :: ListAssessmentFrameworks -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf FrameworkType
frameworkType
instance Data.ToHeaders ListAssessmentFrameworks where
toHeaders :: ListAssessmentFrameworks -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath ListAssessmentFrameworks where
toPath :: ListAssessmentFrameworks -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/assessmentFrameworks"
instance Data.ToQuery ListAssessmentFrameworks where
toQuery :: ListAssessmentFrameworks -> QueryString
toQuery ListAssessmentFrameworks' {Maybe Natural
Maybe Text
FrameworkType
frameworkType :: FrameworkType
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:frameworkType:ListAssessmentFrameworks' :: ListAssessmentFrameworks -> FrameworkType
$sel:nextToken:ListAssessmentFrameworks' :: ListAssessmentFrameworks -> Maybe Text
$sel:maxResults:ListAssessmentFrameworks' :: ListAssessmentFrameworks -> Maybe Natural
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
ByteString
"frameworkType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: FrameworkType
frameworkType
]
data ListAssessmentFrameworksResponse = ListAssessmentFrameworksResponse'
{
ListAssessmentFrameworksResponse
-> Maybe [AssessmentFrameworkMetadata]
frameworkMetadataList :: Prelude.Maybe [AssessmentFrameworkMetadata],
ListAssessmentFrameworksResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListAssessmentFrameworksResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListAssessmentFrameworksResponse
-> ListAssessmentFrameworksResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAssessmentFrameworksResponse
-> ListAssessmentFrameworksResponse -> Bool
$c/= :: ListAssessmentFrameworksResponse
-> ListAssessmentFrameworksResponse -> Bool
== :: ListAssessmentFrameworksResponse
-> ListAssessmentFrameworksResponse -> Bool
$c== :: ListAssessmentFrameworksResponse
-> ListAssessmentFrameworksResponse -> Bool
Prelude.Eq, ReadPrec [ListAssessmentFrameworksResponse]
ReadPrec ListAssessmentFrameworksResponse
Int -> ReadS ListAssessmentFrameworksResponse
ReadS [ListAssessmentFrameworksResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAssessmentFrameworksResponse]
$creadListPrec :: ReadPrec [ListAssessmentFrameworksResponse]
readPrec :: ReadPrec ListAssessmentFrameworksResponse
$creadPrec :: ReadPrec ListAssessmentFrameworksResponse
readList :: ReadS [ListAssessmentFrameworksResponse]
$creadList :: ReadS [ListAssessmentFrameworksResponse]
readsPrec :: Int -> ReadS ListAssessmentFrameworksResponse
$creadsPrec :: Int -> ReadS ListAssessmentFrameworksResponse
Prelude.Read, Int -> ListAssessmentFrameworksResponse -> ShowS
[ListAssessmentFrameworksResponse] -> ShowS
ListAssessmentFrameworksResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAssessmentFrameworksResponse] -> ShowS
$cshowList :: [ListAssessmentFrameworksResponse] -> ShowS
show :: ListAssessmentFrameworksResponse -> String
$cshow :: ListAssessmentFrameworksResponse -> String
showsPrec :: Int -> ListAssessmentFrameworksResponse -> ShowS
$cshowsPrec :: Int -> ListAssessmentFrameworksResponse -> ShowS
Prelude.Show, forall x.
Rep ListAssessmentFrameworksResponse x
-> ListAssessmentFrameworksResponse
forall x.
ListAssessmentFrameworksResponse
-> Rep ListAssessmentFrameworksResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAssessmentFrameworksResponse x
-> ListAssessmentFrameworksResponse
$cfrom :: forall x.
ListAssessmentFrameworksResponse
-> Rep ListAssessmentFrameworksResponse x
Prelude.Generic)
newListAssessmentFrameworksResponse ::
Prelude.Int ->
ListAssessmentFrameworksResponse
newListAssessmentFrameworksResponse :: Int -> ListAssessmentFrameworksResponse
newListAssessmentFrameworksResponse Int
pHttpStatus_ =
ListAssessmentFrameworksResponse'
{ $sel:frameworkMetadataList:ListAssessmentFrameworksResponse' :: Maybe [AssessmentFrameworkMetadata]
frameworkMetadataList =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListAssessmentFrameworksResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListAssessmentFrameworksResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listAssessmentFrameworksResponse_frameworkMetadataList :: Lens.Lens' ListAssessmentFrameworksResponse (Prelude.Maybe [AssessmentFrameworkMetadata])
listAssessmentFrameworksResponse_frameworkMetadataList :: Lens'
ListAssessmentFrameworksResponse
(Maybe [AssessmentFrameworkMetadata])
listAssessmentFrameworksResponse_frameworkMetadataList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAssessmentFrameworksResponse' {Maybe [AssessmentFrameworkMetadata]
frameworkMetadataList :: Maybe [AssessmentFrameworkMetadata]
$sel:frameworkMetadataList:ListAssessmentFrameworksResponse' :: ListAssessmentFrameworksResponse
-> Maybe [AssessmentFrameworkMetadata]
frameworkMetadataList} -> Maybe [AssessmentFrameworkMetadata]
frameworkMetadataList) (\s :: ListAssessmentFrameworksResponse
s@ListAssessmentFrameworksResponse' {} Maybe [AssessmentFrameworkMetadata]
a -> ListAssessmentFrameworksResponse
s {$sel:frameworkMetadataList:ListAssessmentFrameworksResponse' :: Maybe [AssessmentFrameworkMetadata]
frameworkMetadataList = Maybe [AssessmentFrameworkMetadata]
a} :: ListAssessmentFrameworksResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listAssessmentFrameworksResponse_nextToken :: Lens.Lens' ListAssessmentFrameworksResponse (Prelude.Maybe Prelude.Text)
listAssessmentFrameworksResponse_nextToken :: Lens' ListAssessmentFrameworksResponse (Maybe Text)
listAssessmentFrameworksResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAssessmentFrameworksResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAssessmentFrameworksResponse' :: ListAssessmentFrameworksResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAssessmentFrameworksResponse
s@ListAssessmentFrameworksResponse' {} Maybe Text
a -> ListAssessmentFrameworksResponse
s {$sel:nextToken:ListAssessmentFrameworksResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListAssessmentFrameworksResponse)
listAssessmentFrameworksResponse_httpStatus :: Lens.Lens' ListAssessmentFrameworksResponse Prelude.Int
listAssessmentFrameworksResponse_httpStatus :: Lens' ListAssessmentFrameworksResponse Int
listAssessmentFrameworksResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAssessmentFrameworksResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListAssessmentFrameworksResponse' :: ListAssessmentFrameworksResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListAssessmentFrameworksResponse
s@ListAssessmentFrameworksResponse' {} Int
a -> ListAssessmentFrameworksResponse
s {$sel:httpStatus:ListAssessmentFrameworksResponse' :: Int
httpStatus = Int
a} :: ListAssessmentFrameworksResponse)
instance
Prelude.NFData
ListAssessmentFrameworksResponse
where
rnf :: ListAssessmentFrameworksResponse -> ()
rnf ListAssessmentFrameworksResponse' {Int
Maybe [AssessmentFrameworkMetadata]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
frameworkMetadataList :: Maybe [AssessmentFrameworkMetadata]
$sel:httpStatus:ListAssessmentFrameworksResponse' :: ListAssessmentFrameworksResponse -> Int
$sel:nextToken:ListAssessmentFrameworksResponse' :: ListAssessmentFrameworksResponse -> Maybe Text
$sel:frameworkMetadataList:ListAssessmentFrameworksResponse' :: ListAssessmentFrameworksResponse
-> Maybe [AssessmentFrameworkMetadata]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [AssessmentFrameworkMetadata]
frameworkMetadataList
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus