{-# 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.Redshift.DeleteEventSubscription
(
DeleteEventSubscription (..),
newDeleteEventSubscription,
deleteEventSubscription_subscriptionName,
DeleteEventSubscriptionResponse (..),
newDeleteEventSubscriptionResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteEventSubscription = DeleteEventSubscription'
{
DeleteEventSubscription -> Text
subscriptionName :: Prelude.Text
}
deriving (DeleteEventSubscription -> DeleteEventSubscription -> Bool
(DeleteEventSubscription -> DeleteEventSubscription -> Bool)
-> (DeleteEventSubscription -> DeleteEventSubscription -> Bool)
-> Eq DeleteEventSubscription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteEventSubscription -> DeleteEventSubscription -> Bool
$c/= :: DeleteEventSubscription -> DeleteEventSubscription -> Bool
== :: DeleteEventSubscription -> DeleteEventSubscription -> Bool
$c== :: DeleteEventSubscription -> DeleteEventSubscription -> Bool
Prelude.Eq, ReadPrec [DeleteEventSubscription]
ReadPrec DeleteEventSubscription
Int -> ReadS DeleteEventSubscription
ReadS [DeleteEventSubscription]
(Int -> ReadS DeleteEventSubscription)
-> ReadS [DeleteEventSubscription]
-> ReadPrec DeleteEventSubscription
-> ReadPrec [DeleteEventSubscription]
-> Read DeleteEventSubscription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteEventSubscription]
$creadListPrec :: ReadPrec [DeleteEventSubscription]
readPrec :: ReadPrec DeleteEventSubscription
$creadPrec :: ReadPrec DeleteEventSubscription
readList :: ReadS [DeleteEventSubscription]
$creadList :: ReadS [DeleteEventSubscription]
readsPrec :: Int -> ReadS DeleteEventSubscription
$creadsPrec :: Int -> ReadS DeleteEventSubscription
Prelude.Read, Int -> DeleteEventSubscription -> ShowS
[DeleteEventSubscription] -> ShowS
DeleteEventSubscription -> String
(Int -> DeleteEventSubscription -> ShowS)
-> (DeleteEventSubscription -> String)
-> ([DeleteEventSubscription] -> ShowS)
-> Show DeleteEventSubscription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteEventSubscription] -> ShowS
$cshowList :: [DeleteEventSubscription] -> ShowS
show :: DeleteEventSubscription -> String
$cshow :: DeleteEventSubscription -> String
showsPrec :: Int -> DeleteEventSubscription -> ShowS
$cshowsPrec :: Int -> DeleteEventSubscription -> ShowS
Prelude.Show, (forall x.
DeleteEventSubscription -> Rep DeleteEventSubscription x)
-> (forall x.
Rep DeleteEventSubscription x -> DeleteEventSubscription)
-> Generic DeleteEventSubscription
forall x. Rep DeleteEventSubscription x -> DeleteEventSubscription
forall x. DeleteEventSubscription -> Rep DeleteEventSubscription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteEventSubscription x -> DeleteEventSubscription
$cfrom :: forall x. DeleteEventSubscription -> Rep DeleteEventSubscription x
Prelude.Generic)
newDeleteEventSubscription ::
Prelude.Text ->
DeleteEventSubscription
newDeleteEventSubscription :: Text -> DeleteEventSubscription
newDeleteEventSubscription Text
pSubscriptionName_ =
DeleteEventSubscription' :: Text -> DeleteEventSubscription
DeleteEventSubscription'
{ $sel:subscriptionName:DeleteEventSubscription' :: Text
subscriptionName =
Text
pSubscriptionName_
}
deleteEventSubscription_subscriptionName :: Lens.Lens' DeleteEventSubscription Prelude.Text
deleteEventSubscription_subscriptionName :: (Text -> f Text)
-> DeleteEventSubscription -> f DeleteEventSubscription
deleteEventSubscription_subscriptionName = (DeleteEventSubscription -> Text)
-> (DeleteEventSubscription -> Text -> DeleteEventSubscription)
-> Lens DeleteEventSubscription DeleteEventSubscription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteEventSubscription' {Text
subscriptionName :: Text
$sel:subscriptionName:DeleteEventSubscription' :: DeleteEventSubscription -> Text
subscriptionName} -> Text
subscriptionName) (\s :: DeleteEventSubscription
s@DeleteEventSubscription' {} Text
a -> DeleteEventSubscription
s {$sel:subscriptionName:DeleteEventSubscription' :: Text
subscriptionName = Text
a} :: DeleteEventSubscription)
instance Core.AWSRequest DeleteEventSubscription where
type
AWSResponse DeleteEventSubscription =
DeleteEventSubscriptionResponse
request :: DeleteEventSubscription -> Request DeleteEventSubscription
request = Service
-> DeleteEventSubscription -> Request DeleteEventSubscription
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteEventSubscription
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteEventSubscription)))
response =
AWSResponse DeleteEventSubscription
-> Logger
-> Service
-> Proxy DeleteEventSubscription
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteEventSubscription)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteEventSubscription
DeleteEventSubscriptionResponse
DeleteEventSubscriptionResponse'
instance Prelude.Hashable DeleteEventSubscription
instance Prelude.NFData DeleteEventSubscription
instance Core.ToHeaders DeleteEventSubscription where
toHeaders :: DeleteEventSubscription -> [Header]
toHeaders = [Header] -> DeleteEventSubscription -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteEventSubscription where
toPath :: DeleteEventSubscription -> ByteString
toPath = ByteString -> DeleteEventSubscription -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteEventSubscription where
toQuery :: DeleteEventSubscription -> QueryString
toQuery DeleteEventSubscription' {Text
subscriptionName :: Text
$sel:subscriptionName:DeleteEventSubscription' :: DeleteEventSubscription -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DeleteEventSubscription" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
ByteString
"SubscriptionName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
subscriptionName
]
data DeleteEventSubscriptionResponse = DeleteEventSubscriptionResponse'
{
}
deriving (DeleteEventSubscriptionResponse
-> DeleteEventSubscriptionResponse -> Bool
(DeleteEventSubscriptionResponse
-> DeleteEventSubscriptionResponse -> Bool)
-> (DeleteEventSubscriptionResponse
-> DeleteEventSubscriptionResponse -> Bool)
-> Eq DeleteEventSubscriptionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteEventSubscriptionResponse
-> DeleteEventSubscriptionResponse -> Bool
$c/= :: DeleteEventSubscriptionResponse
-> DeleteEventSubscriptionResponse -> Bool
== :: DeleteEventSubscriptionResponse
-> DeleteEventSubscriptionResponse -> Bool
$c== :: DeleteEventSubscriptionResponse
-> DeleteEventSubscriptionResponse -> Bool
Prelude.Eq, ReadPrec [DeleteEventSubscriptionResponse]
ReadPrec DeleteEventSubscriptionResponse
Int -> ReadS DeleteEventSubscriptionResponse
ReadS [DeleteEventSubscriptionResponse]
(Int -> ReadS DeleteEventSubscriptionResponse)
-> ReadS [DeleteEventSubscriptionResponse]
-> ReadPrec DeleteEventSubscriptionResponse
-> ReadPrec [DeleteEventSubscriptionResponse]
-> Read DeleteEventSubscriptionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteEventSubscriptionResponse]
$creadListPrec :: ReadPrec [DeleteEventSubscriptionResponse]
readPrec :: ReadPrec DeleteEventSubscriptionResponse
$creadPrec :: ReadPrec DeleteEventSubscriptionResponse
readList :: ReadS [DeleteEventSubscriptionResponse]
$creadList :: ReadS [DeleteEventSubscriptionResponse]
readsPrec :: Int -> ReadS DeleteEventSubscriptionResponse
$creadsPrec :: Int -> ReadS DeleteEventSubscriptionResponse
Prelude.Read, Int -> DeleteEventSubscriptionResponse -> ShowS
[DeleteEventSubscriptionResponse] -> ShowS
DeleteEventSubscriptionResponse -> String
(Int -> DeleteEventSubscriptionResponse -> ShowS)
-> (DeleteEventSubscriptionResponse -> String)
-> ([DeleteEventSubscriptionResponse] -> ShowS)
-> Show DeleteEventSubscriptionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteEventSubscriptionResponse] -> ShowS
$cshowList :: [DeleteEventSubscriptionResponse] -> ShowS
show :: DeleteEventSubscriptionResponse -> String
$cshow :: DeleteEventSubscriptionResponse -> String
showsPrec :: Int -> DeleteEventSubscriptionResponse -> ShowS
$cshowsPrec :: Int -> DeleteEventSubscriptionResponse -> ShowS
Prelude.Show, (forall x.
DeleteEventSubscriptionResponse
-> Rep DeleteEventSubscriptionResponse x)
-> (forall x.
Rep DeleteEventSubscriptionResponse x
-> DeleteEventSubscriptionResponse)
-> Generic DeleteEventSubscriptionResponse
forall x.
Rep DeleteEventSubscriptionResponse x
-> DeleteEventSubscriptionResponse
forall x.
DeleteEventSubscriptionResponse
-> Rep DeleteEventSubscriptionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteEventSubscriptionResponse x
-> DeleteEventSubscriptionResponse
$cfrom :: forall x.
DeleteEventSubscriptionResponse
-> Rep DeleteEventSubscriptionResponse x
Prelude.Generic)
newDeleteEventSubscriptionResponse ::
DeleteEventSubscriptionResponse
newDeleteEventSubscriptionResponse :: DeleteEventSubscriptionResponse
newDeleteEventSubscriptionResponse =
DeleteEventSubscriptionResponse
DeleteEventSubscriptionResponse'
instance
Prelude.NFData
DeleteEventSubscriptionResponse