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