{-# 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.DeleteRecoveryPoint
(
DeleteRecoveryPoint (..),
newDeleteRecoveryPoint,
deleteRecoveryPoint_backupVaultName,
deleteRecoveryPoint_recoveryPointArn,
DeleteRecoveryPointResponse (..),
newDeleteRecoveryPointResponse,
)
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 DeleteRecoveryPoint = DeleteRecoveryPoint'
{
DeleteRecoveryPoint -> Text
backupVaultName :: Prelude.Text,
DeleteRecoveryPoint -> Text
recoveryPointArn :: Prelude.Text
}
deriving (DeleteRecoveryPoint -> DeleteRecoveryPoint -> Bool
(DeleteRecoveryPoint -> DeleteRecoveryPoint -> Bool)
-> (DeleteRecoveryPoint -> DeleteRecoveryPoint -> Bool)
-> Eq DeleteRecoveryPoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRecoveryPoint -> DeleteRecoveryPoint -> Bool
$c/= :: DeleteRecoveryPoint -> DeleteRecoveryPoint -> Bool
== :: DeleteRecoveryPoint -> DeleteRecoveryPoint -> Bool
$c== :: DeleteRecoveryPoint -> DeleteRecoveryPoint -> Bool
Prelude.Eq, ReadPrec [DeleteRecoveryPoint]
ReadPrec DeleteRecoveryPoint
Int -> ReadS DeleteRecoveryPoint
ReadS [DeleteRecoveryPoint]
(Int -> ReadS DeleteRecoveryPoint)
-> ReadS [DeleteRecoveryPoint]
-> ReadPrec DeleteRecoveryPoint
-> ReadPrec [DeleteRecoveryPoint]
-> Read DeleteRecoveryPoint
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRecoveryPoint]
$creadListPrec :: ReadPrec [DeleteRecoveryPoint]
readPrec :: ReadPrec DeleteRecoveryPoint
$creadPrec :: ReadPrec DeleteRecoveryPoint
readList :: ReadS [DeleteRecoveryPoint]
$creadList :: ReadS [DeleteRecoveryPoint]
readsPrec :: Int -> ReadS DeleteRecoveryPoint
$creadsPrec :: Int -> ReadS DeleteRecoveryPoint
Prelude.Read, Int -> DeleteRecoveryPoint -> ShowS
[DeleteRecoveryPoint] -> ShowS
DeleteRecoveryPoint -> String
(Int -> DeleteRecoveryPoint -> ShowS)
-> (DeleteRecoveryPoint -> String)
-> ([DeleteRecoveryPoint] -> ShowS)
-> Show DeleteRecoveryPoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRecoveryPoint] -> ShowS
$cshowList :: [DeleteRecoveryPoint] -> ShowS
show :: DeleteRecoveryPoint -> String
$cshow :: DeleteRecoveryPoint -> String
showsPrec :: Int -> DeleteRecoveryPoint -> ShowS
$cshowsPrec :: Int -> DeleteRecoveryPoint -> ShowS
Prelude.Show, (forall x. DeleteRecoveryPoint -> Rep DeleteRecoveryPoint x)
-> (forall x. Rep DeleteRecoveryPoint x -> DeleteRecoveryPoint)
-> Generic DeleteRecoveryPoint
forall x. Rep DeleteRecoveryPoint x -> DeleteRecoveryPoint
forall x. DeleteRecoveryPoint -> Rep DeleteRecoveryPoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteRecoveryPoint x -> DeleteRecoveryPoint
$cfrom :: forall x. DeleteRecoveryPoint -> Rep DeleteRecoveryPoint x
Prelude.Generic)
newDeleteRecoveryPoint ::
Prelude.Text ->
Prelude.Text ->
DeleteRecoveryPoint
newDeleteRecoveryPoint :: Text -> Text -> DeleteRecoveryPoint
newDeleteRecoveryPoint
Text
pBackupVaultName_
Text
pRecoveryPointArn_ =
DeleteRecoveryPoint' :: Text -> Text -> DeleteRecoveryPoint
DeleteRecoveryPoint'
{ $sel:backupVaultName:DeleteRecoveryPoint' :: Text
backupVaultName =
Text
pBackupVaultName_,
$sel:recoveryPointArn:DeleteRecoveryPoint' :: Text
recoveryPointArn = Text
pRecoveryPointArn_
}
deleteRecoveryPoint_backupVaultName :: Lens.Lens' DeleteRecoveryPoint Prelude.Text
deleteRecoveryPoint_backupVaultName :: (Text -> f Text) -> DeleteRecoveryPoint -> f DeleteRecoveryPoint
deleteRecoveryPoint_backupVaultName = (DeleteRecoveryPoint -> Text)
-> (DeleteRecoveryPoint -> Text -> DeleteRecoveryPoint)
-> Lens DeleteRecoveryPoint DeleteRecoveryPoint Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRecoveryPoint' {Text
backupVaultName :: Text
$sel:backupVaultName:DeleteRecoveryPoint' :: DeleteRecoveryPoint -> Text
backupVaultName} -> Text
backupVaultName) (\s :: DeleteRecoveryPoint
s@DeleteRecoveryPoint' {} Text
a -> DeleteRecoveryPoint
s {$sel:backupVaultName:DeleteRecoveryPoint' :: Text
backupVaultName = Text
a} :: DeleteRecoveryPoint)
deleteRecoveryPoint_recoveryPointArn :: Lens.Lens' DeleteRecoveryPoint Prelude.Text
deleteRecoveryPoint_recoveryPointArn :: (Text -> f Text) -> DeleteRecoveryPoint -> f DeleteRecoveryPoint
deleteRecoveryPoint_recoveryPointArn = (DeleteRecoveryPoint -> Text)
-> (DeleteRecoveryPoint -> Text -> DeleteRecoveryPoint)
-> Lens DeleteRecoveryPoint DeleteRecoveryPoint Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRecoveryPoint' {Text
recoveryPointArn :: Text
$sel:recoveryPointArn:DeleteRecoveryPoint' :: DeleteRecoveryPoint -> Text
recoveryPointArn} -> Text
recoveryPointArn) (\s :: DeleteRecoveryPoint
s@DeleteRecoveryPoint' {} Text
a -> DeleteRecoveryPoint
s {$sel:recoveryPointArn:DeleteRecoveryPoint' :: Text
recoveryPointArn = Text
a} :: DeleteRecoveryPoint)
instance Core.AWSRequest DeleteRecoveryPoint where
type
AWSResponse DeleteRecoveryPoint =
DeleteRecoveryPointResponse
request :: DeleteRecoveryPoint -> Request DeleteRecoveryPoint
request = Service -> DeleteRecoveryPoint -> Request DeleteRecoveryPoint
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteRecoveryPoint
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteRecoveryPoint)))
response =
AWSResponse DeleteRecoveryPoint
-> Logger
-> Service
-> Proxy DeleteRecoveryPoint
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteRecoveryPoint)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteRecoveryPoint
DeleteRecoveryPointResponse
DeleteRecoveryPointResponse'
instance Prelude.Hashable DeleteRecoveryPoint
instance Prelude.NFData DeleteRecoveryPoint
instance Core.ToHeaders DeleteRecoveryPoint where
toHeaders :: DeleteRecoveryPoint -> [Header]
toHeaders =
[Header] -> DeleteRecoveryPoint -> [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 DeleteRecoveryPoint where
toPath :: DeleteRecoveryPoint -> ByteString
toPath DeleteRecoveryPoint' {Text
recoveryPointArn :: Text
backupVaultName :: Text
$sel:recoveryPointArn:DeleteRecoveryPoint' :: DeleteRecoveryPoint -> Text
$sel:backupVaultName:DeleteRecoveryPoint' :: DeleteRecoveryPoint -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/backup-vaults/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
backupVaultName,
ByteString
"/recovery-points/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
recoveryPointArn
]
instance Core.ToQuery DeleteRecoveryPoint where
toQuery :: DeleteRecoveryPoint -> QueryString
toQuery = QueryString -> DeleteRecoveryPoint -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteRecoveryPointResponse = DeleteRecoveryPointResponse'
{
}
deriving (DeleteRecoveryPointResponse -> DeleteRecoveryPointResponse -> Bool
(DeleteRecoveryPointResponse
-> DeleteRecoveryPointResponse -> Bool)
-> (DeleteRecoveryPointResponse
-> DeleteRecoveryPointResponse -> Bool)
-> Eq DeleteRecoveryPointResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRecoveryPointResponse -> DeleteRecoveryPointResponse -> Bool
$c/= :: DeleteRecoveryPointResponse -> DeleteRecoveryPointResponse -> Bool
== :: DeleteRecoveryPointResponse -> DeleteRecoveryPointResponse -> Bool
$c== :: DeleteRecoveryPointResponse -> DeleteRecoveryPointResponse -> Bool
Prelude.Eq, ReadPrec [DeleteRecoveryPointResponse]
ReadPrec DeleteRecoveryPointResponse
Int -> ReadS DeleteRecoveryPointResponse
ReadS [DeleteRecoveryPointResponse]
(Int -> ReadS DeleteRecoveryPointResponse)
-> ReadS [DeleteRecoveryPointResponse]
-> ReadPrec DeleteRecoveryPointResponse
-> ReadPrec [DeleteRecoveryPointResponse]
-> Read DeleteRecoveryPointResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRecoveryPointResponse]
$creadListPrec :: ReadPrec [DeleteRecoveryPointResponse]
readPrec :: ReadPrec DeleteRecoveryPointResponse
$creadPrec :: ReadPrec DeleteRecoveryPointResponse
readList :: ReadS [DeleteRecoveryPointResponse]
$creadList :: ReadS [DeleteRecoveryPointResponse]
readsPrec :: Int -> ReadS DeleteRecoveryPointResponse
$creadsPrec :: Int -> ReadS DeleteRecoveryPointResponse
Prelude.Read, Int -> DeleteRecoveryPointResponse -> ShowS
[DeleteRecoveryPointResponse] -> ShowS
DeleteRecoveryPointResponse -> String
(Int -> DeleteRecoveryPointResponse -> ShowS)
-> (DeleteRecoveryPointResponse -> String)
-> ([DeleteRecoveryPointResponse] -> ShowS)
-> Show DeleteRecoveryPointResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRecoveryPointResponse] -> ShowS
$cshowList :: [DeleteRecoveryPointResponse] -> ShowS
show :: DeleteRecoveryPointResponse -> String
$cshow :: DeleteRecoveryPointResponse -> String
showsPrec :: Int -> DeleteRecoveryPointResponse -> ShowS
$cshowsPrec :: Int -> DeleteRecoveryPointResponse -> ShowS
Prelude.Show, (forall x.
DeleteRecoveryPointResponse -> Rep DeleteRecoveryPointResponse x)
-> (forall x.
Rep DeleteRecoveryPointResponse x -> DeleteRecoveryPointResponse)
-> Generic DeleteRecoveryPointResponse
forall x.
Rep DeleteRecoveryPointResponse x -> DeleteRecoveryPointResponse
forall x.
DeleteRecoveryPointResponse -> Rep DeleteRecoveryPointResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteRecoveryPointResponse x -> DeleteRecoveryPointResponse
$cfrom :: forall x.
DeleteRecoveryPointResponse -> Rep DeleteRecoveryPointResponse x
Prelude.Generic)
newDeleteRecoveryPointResponse ::
DeleteRecoveryPointResponse
newDeleteRecoveryPointResponse :: DeleteRecoveryPointResponse
newDeleteRecoveryPointResponse =
DeleteRecoveryPointResponse
DeleteRecoveryPointResponse'
instance Prelude.NFData DeleteRecoveryPointResponse