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