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