{-# 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.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 DeleteRecoveryPoint = DeleteRecoveryPoint'
{
DeleteRecoveryPoint -> Text
backupVaultName :: Prelude.Text,
DeleteRecoveryPoint -> Text
recoveryPointArn :: Prelude.Text
}
deriving (DeleteRecoveryPoint -> DeleteRecoveryPoint -> Bool
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]
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
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. 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'
{ $sel:backupVaultName:DeleteRecoveryPoint' :: Text
backupVaultName =
Text
pBackupVaultName_,
$sel:recoveryPointArn:DeleteRecoveryPoint' :: Text
recoveryPointArn = Text
pRecoveryPointArn_
}
deleteRecoveryPoint_backupVaultName :: Lens.Lens' DeleteRecoveryPoint Prelude.Text
deleteRecoveryPoint_backupVaultName :: Lens' DeleteRecoveryPoint Text
deleteRecoveryPoint_backupVaultName = 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 :: Lens' DeleteRecoveryPoint Text
deleteRecoveryPoint_recoveryPointArn = 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 :: (Service -> Service)
-> DeleteRecoveryPoint -> Request DeleteRecoveryPoint
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteRecoveryPoint
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteRecoveryPoint)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull DeleteRecoveryPointResponse
DeleteRecoveryPointResponse'
instance Prelude.Hashable DeleteRecoveryPoint where
hashWithSalt :: Int -> DeleteRecoveryPoint -> Int
hashWithSalt Int
_salt DeleteRecoveryPoint' {Text
recoveryPointArn :: Text
backupVaultName :: Text
$sel:recoveryPointArn:DeleteRecoveryPoint' :: DeleteRecoveryPoint -> Text
$sel:backupVaultName:DeleteRecoveryPoint' :: DeleteRecoveryPoint -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
backupVaultName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
recoveryPointArn
instance Prelude.NFData DeleteRecoveryPoint where
rnf :: DeleteRecoveryPoint -> ()
rnf DeleteRecoveryPoint' {Text
recoveryPointArn :: Text
backupVaultName :: Text
$sel:recoveryPointArn:DeleteRecoveryPoint' :: DeleteRecoveryPoint -> Text
$sel:backupVaultName:DeleteRecoveryPoint' :: DeleteRecoveryPoint -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
backupVaultName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
recoveryPointArn
instance Data.ToHeaders DeleteRecoveryPoint where
toHeaders :: DeleteRecoveryPoint -> [Header]
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 -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath DeleteRecoveryPoint where
toPath :: DeleteRecoveryPoint -> ByteString
toPath DeleteRecoveryPoint' {Text
recoveryPointArn :: Text
backupVaultName :: Text
$sel:recoveryPointArn:DeleteRecoveryPoint' :: DeleteRecoveryPoint -> Text
$sel:backupVaultName:DeleteRecoveryPoint' :: DeleteRecoveryPoint -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/backup-vaults/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
backupVaultName,
ByteString
"/recovery-points/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
recoveryPointArn
]
instance Data.ToQuery DeleteRecoveryPoint where
toQuery :: DeleteRecoveryPoint -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteRecoveryPointResponse = DeleteRecoveryPointResponse'
{
}
deriving (DeleteRecoveryPointResponse -> DeleteRecoveryPointResponse -> Bool
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]
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
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.
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 where
rnf :: DeleteRecoveryPointResponse -> ()
rnf DeleteRecoveryPointResponse
_ = ()