{-# 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.Inspector.DeleteAssessmentTemplate
(
DeleteAssessmentTemplate (..),
newDeleteAssessmentTemplate,
deleteAssessmentTemplate_assessmentTemplateArn,
DeleteAssessmentTemplateResponse (..),
newDeleteAssessmentTemplateResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Inspector.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 DeleteAssessmentTemplate = DeleteAssessmentTemplate'
{
DeleteAssessmentTemplate -> Text
assessmentTemplateArn :: Prelude.Text
}
deriving (DeleteAssessmentTemplate -> DeleteAssessmentTemplate -> Bool
(DeleteAssessmentTemplate -> DeleteAssessmentTemplate -> Bool)
-> (DeleteAssessmentTemplate -> DeleteAssessmentTemplate -> Bool)
-> Eq DeleteAssessmentTemplate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAssessmentTemplate -> DeleteAssessmentTemplate -> Bool
$c/= :: DeleteAssessmentTemplate -> DeleteAssessmentTemplate -> Bool
== :: DeleteAssessmentTemplate -> DeleteAssessmentTemplate -> Bool
$c== :: DeleteAssessmentTemplate -> DeleteAssessmentTemplate -> Bool
Prelude.Eq, ReadPrec [DeleteAssessmentTemplate]
ReadPrec DeleteAssessmentTemplate
Int -> ReadS DeleteAssessmentTemplate
ReadS [DeleteAssessmentTemplate]
(Int -> ReadS DeleteAssessmentTemplate)
-> ReadS [DeleteAssessmentTemplate]
-> ReadPrec DeleteAssessmentTemplate
-> ReadPrec [DeleteAssessmentTemplate]
-> Read DeleteAssessmentTemplate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAssessmentTemplate]
$creadListPrec :: ReadPrec [DeleteAssessmentTemplate]
readPrec :: ReadPrec DeleteAssessmentTemplate
$creadPrec :: ReadPrec DeleteAssessmentTemplate
readList :: ReadS [DeleteAssessmentTemplate]
$creadList :: ReadS [DeleteAssessmentTemplate]
readsPrec :: Int -> ReadS DeleteAssessmentTemplate
$creadsPrec :: Int -> ReadS DeleteAssessmentTemplate
Prelude.Read, Int -> DeleteAssessmentTemplate -> ShowS
[DeleteAssessmentTemplate] -> ShowS
DeleteAssessmentTemplate -> String
(Int -> DeleteAssessmentTemplate -> ShowS)
-> (DeleteAssessmentTemplate -> String)
-> ([DeleteAssessmentTemplate] -> ShowS)
-> Show DeleteAssessmentTemplate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAssessmentTemplate] -> ShowS
$cshowList :: [DeleteAssessmentTemplate] -> ShowS
show :: DeleteAssessmentTemplate -> String
$cshow :: DeleteAssessmentTemplate -> String
showsPrec :: Int -> DeleteAssessmentTemplate -> ShowS
$cshowsPrec :: Int -> DeleteAssessmentTemplate -> ShowS
Prelude.Show, (forall x.
DeleteAssessmentTemplate -> Rep DeleteAssessmentTemplate x)
-> (forall x.
Rep DeleteAssessmentTemplate x -> DeleteAssessmentTemplate)
-> Generic DeleteAssessmentTemplate
forall x.
Rep DeleteAssessmentTemplate x -> DeleteAssessmentTemplate
forall x.
DeleteAssessmentTemplate -> Rep DeleteAssessmentTemplate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteAssessmentTemplate x -> DeleteAssessmentTemplate
$cfrom :: forall x.
DeleteAssessmentTemplate -> Rep DeleteAssessmentTemplate x
Prelude.Generic)
newDeleteAssessmentTemplate ::
Prelude.Text ->
DeleteAssessmentTemplate
newDeleteAssessmentTemplate :: Text -> DeleteAssessmentTemplate
newDeleteAssessmentTemplate Text
pAssessmentTemplateArn_ =
DeleteAssessmentTemplate' :: Text -> DeleteAssessmentTemplate
DeleteAssessmentTemplate'
{ $sel:assessmentTemplateArn:DeleteAssessmentTemplate' :: Text
assessmentTemplateArn =
Text
pAssessmentTemplateArn_
}
deleteAssessmentTemplate_assessmentTemplateArn :: Lens.Lens' DeleteAssessmentTemplate Prelude.Text
deleteAssessmentTemplate_assessmentTemplateArn :: (Text -> f Text)
-> DeleteAssessmentTemplate -> f DeleteAssessmentTemplate
deleteAssessmentTemplate_assessmentTemplateArn = (DeleteAssessmentTemplate -> Text)
-> (DeleteAssessmentTemplate -> Text -> DeleteAssessmentTemplate)
-> Lens DeleteAssessmentTemplate DeleteAssessmentTemplate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAssessmentTemplate' {Text
assessmentTemplateArn :: Text
$sel:assessmentTemplateArn:DeleteAssessmentTemplate' :: DeleteAssessmentTemplate -> Text
assessmentTemplateArn} -> Text
assessmentTemplateArn) (\s :: DeleteAssessmentTemplate
s@DeleteAssessmentTemplate' {} Text
a -> DeleteAssessmentTemplate
s {$sel:assessmentTemplateArn:DeleteAssessmentTemplate' :: Text
assessmentTemplateArn = Text
a} :: DeleteAssessmentTemplate)
instance Core.AWSRequest DeleteAssessmentTemplate where
type
AWSResponse DeleteAssessmentTemplate =
DeleteAssessmentTemplateResponse
request :: DeleteAssessmentTemplate -> Request DeleteAssessmentTemplate
request = Service
-> DeleteAssessmentTemplate -> Request DeleteAssessmentTemplate
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteAssessmentTemplate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteAssessmentTemplate)))
response =
AWSResponse DeleteAssessmentTemplate
-> Logger
-> Service
-> Proxy DeleteAssessmentTemplate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteAssessmentTemplate)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteAssessmentTemplate
DeleteAssessmentTemplateResponse
DeleteAssessmentTemplateResponse'
instance Prelude.Hashable DeleteAssessmentTemplate
instance Prelude.NFData DeleteAssessmentTemplate
instance Core.ToHeaders DeleteAssessmentTemplate where
toHeaders :: DeleteAssessmentTemplate -> [Header]
toHeaders =
[Header] -> DeleteAssessmentTemplate -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"InspectorService.DeleteAssessmentTemplate" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DeleteAssessmentTemplate where
toJSON :: DeleteAssessmentTemplate -> Value
toJSON DeleteAssessmentTemplate' {Text
assessmentTemplateArn :: Text
$sel:assessmentTemplateArn:DeleteAssessmentTemplate' :: DeleteAssessmentTemplate -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"assessmentTemplateArn"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
assessmentTemplateArn
)
]
)
instance Core.ToPath DeleteAssessmentTemplate where
toPath :: DeleteAssessmentTemplate -> ByteString
toPath = ByteString -> DeleteAssessmentTemplate -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteAssessmentTemplate where
toQuery :: DeleteAssessmentTemplate -> QueryString
toQuery = QueryString -> DeleteAssessmentTemplate -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteAssessmentTemplateResponse = DeleteAssessmentTemplateResponse'
{
}
deriving (DeleteAssessmentTemplateResponse
-> DeleteAssessmentTemplateResponse -> Bool
(DeleteAssessmentTemplateResponse
-> DeleteAssessmentTemplateResponse -> Bool)
-> (DeleteAssessmentTemplateResponse
-> DeleteAssessmentTemplateResponse -> Bool)
-> Eq DeleteAssessmentTemplateResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAssessmentTemplateResponse
-> DeleteAssessmentTemplateResponse -> Bool
$c/= :: DeleteAssessmentTemplateResponse
-> DeleteAssessmentTemplateResponse -> Bool
== :: DeleteAssessmentTemplateResponse
-> DeleteAssessmentTemplateResponse -> Bool
$c== :: DeleteAssessmentTemplateResponse
-> DeleteAssessmentTemplateResponse -> Bool
Prelude.Eq, ReadPrec [DeleteAssessmentTemplateResponse]
ReadPrec DeleteAssessmentTemplateResponse
Int -> ReadS DeleteAssessmentTemplateResponse
ReadS [DeleteAssessmentTemplateResponse]
(Int -> ReadS DeleteAssessmentTemplateResponse)
-> ReadS [DeleteAssessmentTemplateResponse]
-> ReadPrec DeleteAssessmentTemplateResponse
-> ReadPrec [DeleteAssessmentTemplateResponse]
-> Read DeleteAssessmentTemplateResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAssessmentTemplateResponse]
$creadListPrec :: ReadPrec [DeleteAssessmentTemplateResponse]
readPrec :: ReadPrec DeleteAssessmentTemplateResponse
$creadPrec :: ReadPrec DeleteAssessmentTemplateResponse
readList :: ReadS [DeleteAssessmentTemplateResponse]
$creadList :: ReadS [DeleteAssessmentTemplateResponse]
readsPrec :: Int -> ReadS DeleteAssessmentTemplateResponse
$creadsPrec :: Int -> ReadS DeleteAssessmentTemplateResponse
Prelude.Read, Int -> DeleteAssessmentTemplateResponse -> ShowS
[DeleteAssessmentTemplateResponse] -> ShowS
DeleteAssessmentTemplateResponse -> String
(Int -> DeleteAssessmentTemplateResponse -> ShowS)
-> (DeleteAssessmentTemplateResponse -> String)
-> ([DeleteAssessmentTemplateResponse] -> ShowS)
-> Show DeleteAssessmentTemplateResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAssessmentTemplateResponse] -> ShowS
$cshowList :: [DeleteAssessmentTemplateResponse] -> ShowS
show :: DeleteAssessmentTemplateResponse -> String
$cshow :: DeleteAssessmentTemplateResponse -> String
showsPrec :: Int -> DeleteAssessmentTemplateResponse -> ShowS
$cshowsPrec :: Int -> DeleteAssessmentTemplateResponse -> ShowS
Prelude.Show, (forall x.
DeleteAssessmentTemplateResponse
-> Rep DeleteAssessmentTemplateResponse x)
-> (forall x.
Rep DeleteAssessmentTemplateResponse x
-> DeleteAssessmentTemplateResponse)
-> Generic DeleteAssessmentTemplateResponse
forall x.
Rep DeleteAssessmentTemplateResponse x
-> DeleteAssessmentTemplateResponse
forall x.
DeleteAssessmentTemplateResponse
-> Rep DeleteAssessmentTemplateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteAssessmentTemplateResponse x
-> DeleteAssessmentTemplateResponse
$cfrom :: forall x.
DeleteAssessmentTemplateResponse
-> Rep DeleteAssessmentTemplateResponse x
Prelude.Generic)
newDeleteAssessmentTemplateResponse ::
DeleteAssessmentTemplateResponse
newDeleteAssessmentTemplateResponse :: DeleteAssessmentTemplateResponse
newDeleteAssessmentTemplateResponse =
DeleteAssessmentTemplateResponse
DeleteAssessmentTemplateResponse'
instance
Prelude.NFData
DeleteAssessmentTemplateResponse