{-# 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.Backup.DeleteReportPlan
(
DeleteReportPlan (..),
newDeleteReportPlan,
deleteReportPlan_reportPlanName,
DeleteReportPlanResponse (..),
newDeleteReportPlanResponse,
)
where
import Amazonka.Backup.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 DeleteReportPlan = DeleteReportPlan'
{
DeleteReportPlan -> Text
reportPlanName :: Prelude.Text
}
deriving (DeleteReportPlan -> DeleteReportPlan -> Bool
(DeleteReportPlan -> DeleteReportPlan -> Bool)
-> (DeleteReportPlan -> DeleteReportPlan -> Bool)
-> Eq DeleteReportPlan
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteReportPlan -> DeleteReportPlan -> Bool
$c/= :: DeleteReportPlan -> DeleteReportPlan -> Bool
== :: DeleteReportPlan -> DeleteReportPlan -> Bool
$c== :: DeleteReportPlan -> DeleteReportPlan -> Bool
Prelude.Eq, ReadPrec [DeleteReportPlan]
ReadPrec DeleteReportPlan
Int -> ReadS DeleteReportPlan
ReadS [DeleteReportPlan]
(Int -> ReadS DeleteReportPlan)
-> ReadS [DeleteReportPlan]
-> ReadPrec DeleteReportPlan
-> ReadPrec [DeleteReportPlan]
-> Read DeleteReportPlan
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteReportPlan]
$creadListPrec :: ReadPrec [DeleteReportPlan]
readPrec :: ReadPrec DeleteReportPlan
$creadPrec :: ReadPrec DeleteReportPlan
readList :: ReadS [DeleteReportPlan]
$creadList :: ReadS [DeleteReportPlan]
readsPrec :: Int -> ReadS DeleteReportPlan
$creadsPrec :: Int -> ReadS DeleteReportPlan
Prelude.Read, Int -> DeleteReportPlan -> ShowS
[DeleteReportPlan] -> ShowS
DeleteReportPlan -> String
(Int -> DeleteReportPlan -> ShowS)
-> (DeleteReportPlan -> String)
-> ([DeleteReportPlan] -> ShowS)
-> Show DeleteReportPlan
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteReportPlan] -> ShowS
$cshowList :: [DeleteReportPlan] -> ShowS
show :: DeleteReportPlan -> String
$cshow :: DeleteReportPlan -> String
showsPrec :: Int -> DeleteReportPlan -> ShowS
$cshowsPrec :: Int -> DeleteReportPlan -> ShowS
Prelude.Show, (forall x. DeleteReportPlan -> Rep DeleteReportPlan x)
-> (forall x. Rep DeleteReportPlan x -> DeleteReportPlan)
-> Generic DeleteReportPlan
forall x. Rep DeleteReportPlan x -> DeleteReportPlan
forall x. DeleteReportPlan -> Rep DeleteReportPlan x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteReportPlan x -> DeleteReportPlan
$cfrom :: forall x. DeleteReportPlan -> Rep DeleteReportPlan x
Prelude.Generic)
newDeleteReportPlan ::
Prelude.Text ->
DeleteReportPlan
newDeleteReportPlan :: Text -> DeleteReportPlan
newDeleteReportPlan Text
pReportPlanName_ =
DeleteReportPlan' :: Text -> DeleteReportPlan
DeleteReportPlan'
{ $sel:reportPlanName:DeleteReportPlan' :: Text
reportPlanName =
Text
pReportPlanName_
}
deleteReportPlan_reportPlanName :: Lens.Lens' DeleteReportPlan Prelude.Text
deleteReportPlan_reportPlanName :: (Text -> f Text) -> DeleteReportPlan -> f DeleteReportPlan
deleteReportPlan_reportPlanName = (DeleteReportPlan -> Text)
-> (DeleteReportPlan -> Text -> DeleteReportPlan)
-> Lens DeleteReportPlan DeleteReportPlan Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReportPlan' {Text
reportPlanName :: Text
$sel:reportPlanName:DeleteReportPlan' :: DeleteReportPlan -> Text
reportPlanName} -> Text
reportPlanName) (\s :: DeleteReportPlan
s@DeleteReportPlan' {} Text
a -> DeleteReportPlan
s {$sel:reportPlanName:DeleteReportPlan' :: Text
reportPlanName = Text
a} :: DeleteReportPlan)
instance Core.AWSRequest DeleteReportPlan where
type
AWSResponse DeleteReportPlan =
DeleteReportPlanResponse
request :: DeleteReportPlan -> Request DeleteReportPlan
request = Service -> DeleteReportPlan -> Request DeleteReportPlan
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteReportPlan
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteReportPlan)))
response =
AWSResponse DeleteReportPlan
-> Logger
-> Service
-> Proxy DeleteReportPlan
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteReportPlan)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteReportPlan
DeleteReportPlanResponse
DeleteReportPlanResponse'
instance Prelude.Hashable DeleteReportPlan
instance Prelude.NFData DeleteReportPlan
instance Core.ToHeaders DeleteReportPlan where
toHeaders :: DeleteReportPlan -> [Header]
toHeaders =
[Header] -> DeleteReportPlan -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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.ToPath DeleteReportPlan where
toPath :: DeleteReportPlan -> ByteString
toPath DeleteReportPlan' {Text
reportPlanName :: Text
$sel:reportPlanName:DeleteReportPlan' :: DeleteReportPlan -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/audit/report-plans/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
reportPlanName]
instance Core.ToQuery DeleteReportPlan where
toQuery :: DeleteReportPlan -> QueryString
toQuery = QueryString -> DeleteReportPlan -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteReportPlanResponse = DeleteReportPlanResponse'
{
}
deriving (DeleteReportPlanResponse -> DeleteReportPlanResponse -> Bool
(DeleteReportPlanResponse -> DeleteReportPlanResponse -> Bool)
-> (DeleteReportPlanResponse -> DeleteReportPlanResponse -> Bool)
-> Eq DeleteReportPlanResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteReportPlanResponse -> DeleteReportPlanResponse -> Bool
$c/= :: DeleteReportPlanResponse -> DeleteReportPlanResponse -> Bool
== :: DeleteReportPlanResponse -> DeleteReportPlanResponse -> Bool
$c== :: DeleteReportPlanResponse -> DeleteReportPlanResponse -> Bool
Prelude.Eq, ReadPrec [DeleteReportPlanResponse]
ReadPrec DeleteReportPlanResponse
Int -> ReadS DeleteReportPlanResponse
ReadS [DeleteReportPlanResponse]
(Int -> ReadS DeleteReportPlanResponse)
-> ReadS [DeleteReportPlanResponse]
-> ReadPrec DeleteReportPlanResponse
-> ReadPrec [DeleteReportPlanResponse]
-> Read DeleteReportPlanResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteReportPlanResponse]
$creadListPrec :: ReadPrec [DeleteReportPlanResponse]
readPrec :: ReadPrec DeleteReportPlanResponse
$creadPrec :: ReadPrec DeleteReportPlanResponse
readList :: ReadS [DeleteReportPlanResponse]
$creadList :: ReadS [DeleteReportPlanResponse]
readsPrec :: Int -> ReadS DeleteReportPlanResponse
$creadsPrec :: Int -> ReadS DeleteReportPlanResponse
Prelude.Read, Int -> DeleteReportPlanResponse -> ShowS
[DeleteReportPlanResponse] -> ShowS
DeleteReportPlanResponse -> String
(Int -> DeleteReportPlanResponse -> ShowS)
-> (DeleteReportPlanResponse -> String)
-> ([DeleteReportPlanResponse] -> ShowS)
-> Show DeleteReportPlanResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteReportPlanResponse] -> ShowS
$cshowList :: [DeleteReportPlanResponse] -> ShowS
show :: DeleteReportPlanResponse -> String
$cshow :: DeleteReportPlanResponse -> String
showsPrec :: Int -> DeleteReportPlanResponse -> ShowS
$cshowsPrec :: Int -> DeleteReportPlanResponse -> ShowS
Prelude.Show, (forall x.
DeleteReportPlanResponse -> Rep DeleteReportPlanResponse x)
-> (forall x.
Rep DeleteReportPlanResponse x -> DeleteReportPlanResponse)
-> Generic DeleteReportPlanResponse
forall x.
Rep DeleteReportPlanResponse x -> DeleteReportPlanResponse
forall x.
DeleteReportPlanResponse -> Rep DeleteReportPlanResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteReportPlanResponse x -> DeleteReportPlanResponse
$cfrom :: forall x.
DeleteReportPlanResponse -> Rep DeleteReportPlanResponse x
Prelude.Generic)
newDeleteReportPlanResponse ::
DeleteReportPlanResponse
newDeleteReportPlanResponse :: DeleteReportPlanResponse
newDeleteReportPlanResponse =
DeleteReportPlanResponse
DeleteReportPlanResponse'
instance Prelude.NFData DeleteReportPlanResponse