{-# 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.DeleteAssessmentFramework
(
DeleteAssessmentFramework (..),
newDeleteAssessmentFramework,
deleteAssessmentFramework_frameworkId,
DeleteAssessmentFrameworkResponse (..),
newDeleteAssessmentFrameworkResponse,
deleteAssessmentFrameworkResponse_httpStatus,
)
where
import Amazonka.AuditManager.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 DeleteAssessmentFramework = DeleteAssessmentFramework'
{
DeleteAssessmentFramework -> Text
frameworkId :: Prelude.Text
}
deriving (DeleteAssessmentFramework -> DeleteAssessmentFramework -> Bool
(DeleteAssessmentFramework -> DeleteAssessmentFramework -> Bool)
-> (DeleteAssessmentFramework -> DeleteAssessmentFramework -> Bool)
-> Eq DeleteAssessmentFramework
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAssessmentFramework -> DeleteAssessmentFramework -> Bool
$c/= :: DeleteAssessmentFramework -> DeleteAssessmentFramework -> Bool
== :: DeleteAssessmentFramework -> DeleteAssessmentFramework -> Bool
$c== :: DeleteAssessmentFramework -> DeleteAssessmentFramework -> Bool
Prelude.Eq, ReadPrec [DeleteAssessmentFramework]
ReadPrec DeleteAssessmentFramework
Int -> ReadS DeleteAssessmentFramework
ReadS [DeleteAssessmentFramework]
(Int -> ReadS DeleteAssessmentFramework)
-> ReadS [DeleteAssessmentFramework]
-> ReadPrec DeleteAssessmentFramework
-> ReadPrec [DeleteAssessmentFramework]
-> Read DeleteAssessmentFramework
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAssessmentFramework]
$creadListPrec :: ReadPrec [DeleteAssessmentFramework]
readPrec :: ReadPrec DeleteAssessmentFramework
$creadPrec :: ReadPrec DeleteAssessmentFramework
readList :: ReadS [DeleteAssessmentFramework]
$creadList :: ReadS [DeleteAssessmentFramework]
readsPrec :: Int -> ReadS DeleteAssessmentFramework
$creadsPrec :: Int -> ReadS DeleteAssessmentFramework
Prelude.Read, Int -> DeleteAssessmentFramework -> ShowS
[DeleteAssessmentFramework] -> ShowS
DeleteAssessmentFramework -> String
(Int -> DeleteAssessmentFramework -> ShowS)
-> (DeleteAssessmentFramework -> String)
-> ([DeleteAssessmentFramework] -> ShowS)
-> Show DeleteAssessmentFramework
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAssessmentFramework] -> ShowS
$cshowList :: [DeleteAssessmentFramework] -> ShowS
show :: DeleteAssessmentFramework -> String
$cshow :: DeleteAssessmentFramework -> String
showsPrec :: Int -> DeleteAssessmentFramework -> ShowS
$cshowsPrec :: Int -> DeleteAssessmentFramework -> ShowS
Prelude.Show, (forall x.
DeleteAssessmentFramework -> Rep DeleteAssessmentFramework x)
-> (forall x.
Rep DeleteAssessmentFramework x -> DeleteAssessmentFramework)
-> Generic DeleteAssessmentFramework
forall x.
Rep DeleteAssessmentFramework x -> DeleteAssessmentFramework
forall x.
DeleteAssessmentFramework -> Rep DeleteAssessmentFramework x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteAssessmentFramework x -> DeleteAssessmentFramework
$cfrom :: forall x.
DeleteAssessmentFramework -> Rep DeleteAssessmentFramework x
Prelude.Generic)
newDeleteAssessmentFramework ::
Prelude.Text ->
DeleteAssessmentFramework
newDeleteAssessmentFramework :: Text -> DeleteAssessmentFramework
newDeleteAssessmentFramework Text
pFrameworkId_ =
DeleteAssessmentFramework' :: Text -> DeleteAssessmentFramework
DeleteAssessmentFramework'
{ $sel:frameworkId:DeleteAssessmentFramework' :: Text
frameworkId =
Text
pFrameworkId_
}
deleteAssessmentFramework_frameworkId :: Lens.Lens' DeleteAssessmentFramework Prelude.Text
deleteAssessmentFramework_frameworkId :: (Text -> f Text)
-> DeleteAssessmentFramework -> f DeleteAssessmentFramework
deleteAssessmentFramework_frameworkId = (DeleteAssessmentFramework -> Text)
-> (DeleteAssessmentFramework -> Text -> DeleteAssessmentFramework)
-> Lens
DeleteAssessmentFramework DeleteAssessmentFramework Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAssessmentFramework' {Text
frameworkId :: Text
$sel:frameworkId:DeleteAssessmentFramework' :: DeleteAssessmentFramework -> Text
frameworkId} -> Text
frameworkId) (\s :: DeleteAssessmentFramework
s@DeleteAssessmentFramework' {} Text
a -> DeleteAssessmentFramework
s {$sel:frameworkId:DeleteAssessmentFramework' :: Text
frameworkId = Text
a} :: DeleteAssessmentFramework)
instance Core.AWSRequest DeleteAssessmentFramework where
type
AWSResponse DeleteAssessmentFramework =
DeleteAssessmentFrameworkResponse
request :: DeleteAssessmentFramework -> Request DeleteAssessmentFramework
request = Service
-> DeleteAssessmentFramework -> Request DeleteAssessmentFramework
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteAssessmentFramework
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteAssessmentFramework)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteAssessmentFramework))
-> Logger
-> Service
-> Proxy DeleteAssessmentFramework
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteAssessmentFramework)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteAssessmentFrameworkResponse
DeleteAssessmentFrameworkResponse'
(Int -> DeleteAssessmentFrameworkResponse)
-> Either String Int
-> Either String DeleteAssessmentFrameworkResponse
forall (f :: * -> *) a b. Functor 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 DeleteAssessmentFramework
instance Prelude.NFData DeleteAssessmentFramework
instance Core.ToHeaders DeleteAssessmentFramework where
toHeaders :: DeleteAssessmentFramework -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteAssessmentFramework -> 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 DeleteAssessmentFramework where
toPath :: DeleteAssessmentFramework -> ByteString
toPath DeleteAssessmentFramework' {Text
frameworkId :: Text
$sel:frameworkId:DeleteAssessmentFramework' :: DeleteAssessmentFramework -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/assessmentFrameworks/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
frameworkId]
instance Core.ToQuery DeleteAssessmentFramework where
toQuery :: DeleteAssessmentFramework -> QueryString
toQuery = QueryString -> DeleteAssessmentFramework -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteAssessmentFrameworkResponse = DeleteAssessmentFrameworkResponse'
{
DeleteAssessmentFrameworkResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteAssessmentFrameworkResponse
-> DeleteAssessmentFrameworkResponse -> Bool
(DeleteAssessmentFrameworkResponse
-> DeleteAssessmentFrameworkResponse -> Bool)
-> (DeleteAssessmentFrameworkResponse
-> DeleteAssessmentFrameworkResponse -> Bool)
-> Eq DeleteAssessmentFrameworkResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAssessmentFrameworkResponse
-> DeleteAssessmentFrameworkResponse -> Bool
$c/= :: DeleteAssessmentFrameworkResponse
-> DeleteAssessmentFrameworkResponse -> Bool
== :: DeleteAssessmentFrameworkResponse
-> DeleteAssessmentFrameworkResponse -> Bool
$c== :: DeleteAssessmentFrameworkResponse
-> DeleteAssessmentFrameworkResponse -> Bool
Prelude.Eq, ReadPrec [DeleteAssessmentFrameworkResponse]
ReadPrec DeleteAssessmentFrameworkResponse
Int -> ReadS DeleteAssessmentFrameworkResponse
ReadS [DeleteAssessmentFrameworkResponse]
(Int -> ReadS DeleteAssessmentFrameworkResponse)
-> ReadS [DeleteAssessmentFrameworkResponse]
-> ReadPrec DeleteAssessmentFrameworkResponse
-> ReadPrec [DeleteAssessmentFrameworkResponse]
-> Read DeleteAssessmentFrameworkResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAssessmentFrameworkResponse]
$creadListPrec :: ReadPrec [DeleteAssessmentFrameworkResponse]
readPrec :: ReadPrec DeleteAssessmentFrameworkResponse
$creadPrec :: ReadPrec DeleteAssessmentFrameworkResponse
readList :: ReadS [DeleteAssessmentFrameworkResponse]
$creadList :: ReadS [DeleteAssessmentFrameworkResponse]
readsPrec :: Int -> ReadS DeleteAssessmentFrameworkResponse
$creadsPrec :: Int -> ReadS DeleteAssessmentFrameworkResponse
Prelude.Read, Int -> DeleteAssessmentFrameworkResponse -> ShowS
[DeleteAssessmentFrameworkResponse] -> ShowS
DeleteAssessmentFrameworkResponse -> String
(Int -> DeleteAssessmentFrameworkResponse -> ShowS)
-> (DeleteAssessmentFrameworkResponse -> String)
-> ([DeleteAssessmentFrameworkResponse] -> ShowS)
-> Show DeleteAssessmentFrameworkResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAssessmentFrameworkResponse] -> ShowS
$cshowList :: [DeleteAssessmentFrameworkResponse] -> ShowS
show :: DeleteAssessmentFrameworkResponse -> String
$cshow :: DeleteAssessmentFrameworkResponse -> String
showsPrec :: Int -> DeleteAssessmentFrameworkResponse -> ShowS
$cshowsPrec :: Int -> DeleteAssessmentFrameworkResponse -> ShowS
Prelude.Show, (forall x.
DeleteAssessmentFrameworkResponse
-> Rep DeleteAssessmentFrameworkResponse x)
-> (forall x.
Rep DeleteAssessmentFrameworkResponse x
-> DeleteAssessmentFrameworkResponse)
-> Generic DeleteAssessmentFrameworkResponse
forall x.
Rep DeleteAssessmentFrameworkResponse x
-> DeleteAssessmentFrameworkResponse
forall x.
DeleteAssessmentFrameworkResponse
-> Rep DeleteAssessmentFrameworkResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteAssessmentFrameworkResponse x
-> DeleteAssessmentFrameworkResponse
$cfrom :: forall x.
DeleteAssessmentFrameworkResponse
-> Rep DeleteAssessmentFrameworkResponse x
Prelude.Generic)
newDeleteAssessmentFrameworkResponse ::
Prelude.Int ->
DeleteAssessmentFrameworkResponse
newDeleteAssessmentFrameworkResponse :: Int -> DeleteAssessmentFrameworkResponse
newDeleteAssessmentFrameworkResponse Int
pHttpStatus_ =
DeleteAssessmentFrameworkResponse' :: Int -> DeleteAssessmentFrameworkResponse
DeleteAssessmentFrameworkResponse'
{ $sel:httpStatus:DeleteAssessmentFrameworkResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteAssessmentFrameworkResponse_httpStatus :: Lens.Lens' DeleteAssessmentFrameworkResponse Prelude.Int
deleteAssessmentFrameworkResponse_httpStatus :: (Int -> f Int)
-> DeleteAssessmentFrameworkResponse
-> f DeleteAssessmentFrameworkResponse
deleteAssessmentFrameworkResponse_httpStatus = (DeleteAssessmentFrameworkResponse -> Int)
-> (DeleteAssessmentFrameworkResponse
-> Int -> DeleteAssessmentFrameworkResponse)
-> Lens
DeleteAssessmentFrameworkResponse
DeleteAssessmentFrameworkResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAssessmentFrameworkResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteAssessmentFrameworkResponse' :: DeleteAssessmentFrameworkResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteAssessmentFrameworkResponse
s@DeleteAssessmentFrameworkResponse' {} Int
a -> DeleteAssessmentFrameworkResponse
s {$sel:httpStatus:DeleteAssessmentFrameworkResponse' :: Int
httpStatus = Int
a} :: DeleteAssessmentFrameworkResponse)
instance
Prelude.NFData
DeleteAssessmentFrameworkResponse