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