{-# 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.DisassociateRecoveryPointFromParent
(
DisassociateRecoveryPointFromParent (..),
newDisassociateRecoveryPointFromParent,
disassociateRecoveryPointFromParent_backupVaultName,
disassociateRecoveryPointFromParent_recoveryPointArn,
DisassociateRecoveryPointFromParentResponse (..),
newDisassociateRecoveryPointFromParentResponse,
)
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 DisassociateRecoveryPointFromParent = DisassociateRecoveryPointFromParent'
{
DisassociateRecoveryPointFromParent -> Text
backupVaultName :: Prelude.Text,
DisassociateRecoveryPointFromParent -> Text
recoveryPointArn :: Prelude.Text
}
deriving (DisassociateRecoveryPointFromParent
-> DisassociateRecoveryPointFromParent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateRecoveryPointFromParent
-> DisassociateRecoveryPointFromParent -> Bool
$c/= :: DisassociateRecoveryPointFromParent
-> DisassociateRecoveryPointFromParent -> Bool
== :: DisassociateRecoveryPointFromParent
-> DisassociateRecoveryPointFromParent -> Bool
$c== :: DisassociateRecoveryPointFromParent
-> DisassociateRecoveryPointFromParent -> Bool
Prelude.Eq, ReadPrec [DisassociateRecoveryPointFromParent]
ReadPrec DisassociateRecoveryPointFromParent
Int -> ReadS DisassociateRecoveryPointFromParent
ReadS [DisassociateRecoveryPointFromParent]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateRecoveryPointFromParent]
$creadListPrec :: ReadPrec [DisassociateRecoveryPointFromParent]
readPrec :: ReadPrec DisassociateRecoveryPointFromParent
$creadPrec :: ReadPrec DisassociateRecoveryPointFromParent
readList :: ReadS [DisassociateRecoveryPointFromParent]
$creadList :: ReadS [DisassociateRecoveryPointFromParent]
readsPrec :: Int -> ReadS DisassociateRecoveryPointFromParent
$creadsPrec :: Int -> ReadS DisassociateRecoveryPointFromParent
Prelude.Read, Int -> DisassociateRecoveryPointFromParent -> ShowS
[DisassociateRecoveryPointFromParent] -> ShowS
DisassociateRecoveryPointFromParent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateRecoveryPointFromParent] -> ShowS
$cshowList :: [DisassociateRecoveryPointFromParent] -> ShowS
show :: DisassociateRecoveryPointFromParent -> String
$cshow :: DisassociateRecoveryPointFromParent -> String
showsPrec :: Int -> DisassociateRecoveryPointFromParent -> ShowS
$cshowsPrec :: Int -> DisassociateRecoveryPointFromParent -> ShowS
Prelude.Show, forall x.
Rep DisassociateRecoveryPointFromParent x
-> DisassociateRecoveryPointFromParent
forall x.
DisassociateRecoveryPointFromParent
-> Rep DisassociateRecoveryPointFromParent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateRecoveryPointFromParent x
-> DisassociateRecoveryPointFromParent
$cfrom :: forall x.
DisassociateRecoveryPointFromParent
-> Rep DisassociateRecoveryPointFromParent x
Prelude.Generic)
newDisassociateRecoveryPointFromParent ::
Prelude.Text ->
Prelude.Text ->
DisassociateRecoveryPointFromParent
newDisassociateRecoveryPointFromParent :: Text -> Text -> DisassociateRecoveryPointFromParent
newDisassociateRecoveryPointFromParent
Text
pBackupVaultName_
Text
pRecoveryPointArn_ =
DisassociateRecoveryPointFromParent'
{ $sel:backupVaultName:DisassociateRecoveryPointFromParent' :: Text
backupVaultName =
Text
pBackupVaultName_,
$sel:recoveryPointArn:DisassociateRecoveryPointFromParent' :: Text
recoveryPointArn = Text
pRecoveryPointArn_
}
disassociateRecoveryPointFromParent_backupVaultName :: Lens.Lens' DisassociateRecoveryPointFromParent Prelude.Text
disassociateRecoveryPointFromParent_backupVaultName :: Lens' DisassociateRecoveryPointFromParent Text
disassociateRecoveryPointFromParent_backupVaultName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateRecoveryPointFromParent' {Text
backupVaultName :: Text
$sel:backupVaultName:DisassociateRecoveryPointFromParent' :: DisassociateRecoveryPointFromParent -> Text
backupVaultName} -> Text
backupVaultName) (\s :: DisassociateRecoveryPointFromParent
s@DisassociateRecoveryPointFromParent' {} Text
a -> DisassociateRecoveryPointFromParent
s {$sel:backupVaultName:DisassociateRecoveryPointFromParent' :: Text
backupVaultName = Text
a} :: DisassociateRecoveryPointFromParent)
disassociateRecoveryPointFromParent_recoveryPointArn :: Lens.Lens' DisassociateRecoveryPointFromParent Prelude.Text
disassociateRecoveryPointFromParent_recoveryPointArn :: Lens' DisassociateRecoveryPointFromParent Text
disassociateRecoveryPointFromParent_recoveryPointArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateRecoveryPointFromParent' {Text
recoveryPointArn :: Text
$sel:recoveryPointArn:DisassociateRecoveryPointFromParent' :: DisassociateRecoveryPointFromParent -> Text
recoveryPointArn} -> Text
recoveryPointArn) (\s :: DisassociateRecoveryPointFromParent
s@DisassociateRecoveryPointFromParent' {} Text
a -> DisassociateRecoveryPointFromParent
s {$sel:recoveryPointArn:DisassociateRecoveryPointFromParent' :: Text
recoveryPointArn = Text
a} :: DisassociateRecoveryPointFromParent)
instance
Core.AWSRequest
DisassociateRecoveryPointFromParent
where
type
AWSResponse DisassociateRecoveryPointFromParent =
DisassociateRecoveryPointFromParentResponse
request :: (Service -> Service)
-> DisassociateRecoveryPointFromParent
-> Request DisassociateRecoveryPointFromParent
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 DisassociateRecoveryPointFromParent
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DisassociateRecoveryPointFromParent)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
DisassociateRecoveryPointFromParentResponse
DisassociateRecoveryPointFromParentResponse'
instance
Prelude.Hashable
DisassociateRecoveryPointFromParent
where
hashWithSalt :: Int -> DisassociateRecoveryPointFromParent -> Int
hashWithSalt
Int
_salt
DisassociateRecoveryPointFromParent' {Text
recoveryPointArn :: Text
backupVaultName :: Text
$sel:recoveryPointArn:DisassociateRecoveryPointFromParent' :: DisassociateRecoveryPointFromParent -> Text
$sel:backupVaultName:DisassociateRecoveryPointFromParent' :: DisassociateRecoveryPointFromParent -> 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
DisassociateRecoveryPointFromParent
where
rnf :: DisassociateRecoveryPointFromParent -> ()
rnf DisassociateRecoveryPointFromParent' {Text
recoveryPointArn :: Text
backupVaultName :: Text
$sel:recoveryPointArn:DisassociateRecoveryPointFromParent' :: DisassociateRecoveryPointFromParent -> Text
$sel:backupVaultName:DisassociateRecoveryPointFromParent' :: DisassociateRecoveryPointFromParent -> 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
DisassociateRecoveryPointFromParent
where
toHeaders :: DisassociateRecoveryPointFromParent -> [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
DisassociateRecoveryPointFromParent
where
toPath :: DisassociateRecoveryPointFromParent -> ByteString
toPath DisassociateRecoveryPointFromParent' {Text
recoveryPointArn :: Text
backupVaultName :: Text
$sel:recoveryPointArn:DisassociateRecoveryPointFromParent' :: DisassociateRecoveryPointFromParent -> Text
$sel:backupVaultName:DisassociateRecoveryPointFromParent' :: DisassociateRecoveryPointFromParent -> 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,
ByteString
"/parentAssociation"
]
instance
Data.ToQuery
DisassociateRecoveryPointFromParent
where
toQuery :: DisassociateRecoveryPointFromParent -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DisassociateRecoveryPointFromParentResponse = DisassociateRecoveryPointFromParentResponse'
{
}
deriving (DisassociateRecoveryPointFromParentResponse
-> DisassociateRecoveryPointFromParentResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateRecoveryPointFromParentResponse
-> DisassociateRecoveryPointFromParentResponse -> Bool
$c/= :: DisassociateRecoveryPointFromParentResponse
-> DisassociateRecoveryPointFromParentResponse -> Bool
== :: DisassociateRecoveryPointFromParentResponse
-> DisassociateRecoveryPointFromParentResponse -> Bool
$c== :: DisassociateRecoveryPointFromParentResponse
-> DisassociateRecoveryPointFromParentResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateRecoveryPointFromParentResponse]
ReadPrec DisassociateRecoveryPointFromParentResponse
Int -> ReadS DisassociateRecoveryPointFromParentResponse
ReadS [DisassociateRecoveryPointFromParentResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateRecoveryPointFromParentResponse]
$creadListPrec :: ReadPrec [DisassociateRecoveryPointFromParentResponse]
readPrec :: ReadPrec DisassociateRecoveryPointFromParentResponse
$creadPrec :: ReadPrec DisassociateRecoveryPointFromParentResponse
readList :: ReadS [DisassociateRecoveryPointFromParentResponse]
$creadList :: ReadS [DisassociateRecoveryPointFromParentResponse]
readsPrec :: Int -> ReadS DisassociateRecoveryPointFromParentResponse
$creadsPrec :: Int -> ReadS DisassociateRecoveryPointFromParentResponse
Prelude.Read, Int -> DisassociateRecoveryPointFromParentResponse -> ShowS
[DisassociateRecoveryPointFromParentResponse] -> ShowS
DisassociateRecoveryPointFromParentResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateRecoveryPointFromParentResponse] -> ShowS
$cshowList :: [DisassociateRecoveryPointFromParentResponse] -> ShowS
show :: DisassociateRecoveryPointFromParentResponse -> String
$cshow :: DisassociateRecoveryPointFromParentResponse -> String
showsPrec :: Int -> DisassociateRecoveryPointFromParentResponse -> ShowS
$cshowsPrec :: Int -> DisassociateRecoveryPointFromParentResponse -> ShowS
Prelude.Show, forall x.
Rep DisassociateRecoveryPointFromParentResponse x
-> DisassociateRecoveryPointFromParentResponse
forall x.
DisassociateRecoveryPointFromParentResponse
-> Rep DisassociateRecoveryPointFromParentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateRecoveryPointFromParentResponse x
-> DisassociateRecoveryPointFromParentResponse
$cfrom :: forall x.
DisassociateRecoveryPointFromParentResponse
-> Rep DisassociateRecoveryPointFromParentResponse x
Prelude.Generic)
newDisassociateRecoveryPointFromParentResponse ::
DisassociateRecoveryPointFromParentResponse
newDisassociateRecoveryPointFromParentResponse :: DisassociateRecoveryPointFromParentResponse
newDisassociateRecoveryPointFromParentResponse =
DisassociateRecoveryPointFromParentResponse
DisassociateRecoveryPointFromParentResponse'
instance
Prelude.NFData
DisassociateRecoveryPointFromParentResponse
where
rnf :: DisassociateRecoveryPointFromParentResponse -> ()
rnf DisassociateRecoveryPointFromParentResponse
_ = ()