{-# 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.CloudWatchEvents.DeleteEventBus
(
DeleteEventBus (..),
newDeleteEventBus,
deleteEventBus_name,
DeleteEventBusResponse (..),
newDeleteEventBusResponse,
)
where
import Amazonka.CloudWatchEvents.Types
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
data DeleteEventBus = DeleteEventBus'
{
DeleteEventBus -> Text
name :: Prelude.Text
}
deriving (DeleteEventBus -> DeleteEventBus -> Bool
(DeleteEventBus -> DeleteEventBus -> Bool)
-> (DeleteEventBus -> DeleteEventBus -> Bool) -> Eq DeleteEventBus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteEventBus -> DeleteEventBus -> Bool
$c/= :: DeleteEventBus -> DeleteEventBus -> Bool
== :: DeleteEventBus -> DeleteEventBus -> Bool
$c== :: DeleteEventBus -> DeleteEventBus -> Bool
Prelude.Eq, ReadPrec [DeleteEventBus]
ReadPrec DeleteEventBus
Int -> ReadS DeleteEventBus
ReadS [DeleteEventBus]
(Int -> ReadS DeleteEventBus)
-> ReadS [DeleteEventBus]
-> ReadPrec DeleteEventBus
-> ReadPrec [DeleteEventBus]
-> Read DeleteEventBus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteEventBus]
$creadListPrec :: ReadPrec [DeleteEventBus]
readPrec :: ReadPrec DeleteEventBus
$creadPrec :: ReadPrec DeleteEventBus
readList :: ReadS [DeleteEventBus]
$creadList :: ReadS [DeleteEventBus]
readsPrec :: Int -> ReadS DeleteEventBus
$creadsPrec :: Int -> ReadS DeleteEventBus
Prelude.Read, Int -> DeleteEventBus -> ShowS
[DeleteEventBus] -> ShowS
DeleteEventBus -> String
(Int -> DeleteEventBus -> ShowS)
-> (DeleteEventBus -> String)
-> ([DeleteEventBus] -> ShowS)
-> Show DeleteEventBus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteEventBus] -> ShowS
$cshowList :: [DeleteEventBus] -> ShowS
show :: DeleteEventBus -> String
$cshow :: DeleteEventBus -> String
showsPrec :: Int -> DeleteEventBus -> ShowS
$cshowsPrec :: Int -> DeleteEventBus -> ShowS
Prelude.Show, (forall x. DeleteEventBus -> Rep DeleteEventBus x)
-> (forall x. Rep DeleteEventBus x -> DeleteEventBus)
-> Generic DeleteEventBus
forall x. Rep DeleteEventBus x -> DeleteEventBus
forall x. DeleteEventBus -> Rep DeleteEventBus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteEventBus x -> DeleteEventBus
$cfrom :: forall x. DeleteEventBus -> Rep DeleteEventBus x
Prelude.Generic)
newDeleteEventBus ::
Prelude.Text ->
DeleteEventBus
newDeleteEventBus :: Text -> DeleteEventBus
newDeleteEventBus Text
pName_ =
DeleteEventBus' :: Text -> DeleteEventBus
DeleteEventBus' {$sel:name:DeleteEventBus' :: Text
name = Text
pName_}
deleteEventBus_name :: Lens.Lens' DeleteEventBus Prelude.Text
deleteEventBus_name :: (Text -> f Text) -> DeleteEventBus -> f DeleteEventBus
deleteEventBus_name = (DeleteEventBus -> Text)
-> (DeleteEventBus -> Text -> DeleteEventBus)
-> Lens DeleteEventBus DeleteEventBus Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteEventBus' {Text
name :: Text
$sel:name:DeleteEventBus' :: DeleteEventBus -> Text
name} -> Text
name) (\s :: DeleteEventBus
s@DeleteEventBus' {} Text
a -> DeleteEventBus
s {$sel:name:DeleteEventBus' :: Text
name = Text
a} :: DeleteEventBus)
instance Core.AWSRequest DeleteEventBus where
type
AWSResponse DeleteEventBus =
DeleteEventBusResponse
request :: DeleteEventBus -> Request DeleteEventBus
request = Service -> DeleteEventBus -> Request DeleteEventBus
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteEventBus
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteEventBus)))
response =
AWSResponse DeleteEventBus
-> Logger
-> Service
-> Proxy DeleteEventBus
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteEventBus)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteEventBus
DeleteEventBusResponse
DeleteEventBusResponse'
instance Prelude.Hashable DeleteEventBus
instance Prelude.NFData DeleteEventBus
instance Core.ToHeaders DeleteEventBus where
toHeaders :: DeleteEventBus -> [Header]
toHeaders =
[Header] -> DeleteEventBus -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# (ByteString
"AWSEvents.DeleteEventBus" :: Prelude.ByteString),
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.ToJSON DeleteEventBus where
toJSON :: DeleteEventBus -> Value
toJSON DeleteEventBus' {Text
name :: Text
$sel:name:DeleteEventBus' :: DeleteEventBus -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)]
)
instance Core.ToPath DeleteEventBus where
toPath :: DeleteEventBus -> ByteString
toPath = ByteString -> DeleteEventBus -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteEventBus where
toQuery :: DeleteEventBus -> QueryString
toQuery = QueryString -> DeleteEventBus -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteEventBusResponse = DeleteEventBusResponse'
{
}
deriving (DeleteEventBusResponse -> DeleteEventBusResponse -> Bool
(DeleteEventBusResponse -> DeleteEventBusResponse -> Bool)
-> (DeleteEventBusResponse -> DeleteEventBusResponse -> Bool)
-> Eq DeleteEventBusResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteEventBusResponse -> DeleteEventBusResponse -> Bool
$c/= :: DeleteEventBusResponse -> DeleteEventBusResponse -> Bool
== :: DeleteEventBusResponse -> DeleteEventBusResponse -> Bool
$c== :: DeleteEventBusResponse -> DeleteEventBusResponse -> Bool
Prelude.Eq, ReadPrec [DeleteEventBusResponse]
ReadPrec DeleteEventBusResponse
Int -> ReadS DeleteEventBusResponse
ReadS [DeleteEventBusResponse]
(Int -> ReadS DeleteEventBusResponse)
-> ReadS [DeleteEventBusResponse]
-> ReadPrec DeleteEventBusResponse
-> ReadPrec [DeleteEventBusResponse]
-> Read DeleteEventBusResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteEventBusResponse]
$creadListPrec :: ReadPrec [DeleteEventBusResponse]
readPrec :: ReadPrec DeleteEventBusResponse
$creadPrec :: ReadPrec DeleteEventBusResponse
readList :: ReadS [DeleteEventBusResponse]
$creadList :: ReadS [DeleteEventBusResponse]
readsPrec :: Int -> ReadS DeleteEventBusResponse
$creadsPrec :: Int -> ReadS DeleteEventBusResponse
Prelude.Read, Int -> DeleteEventBusResponse -> ShowS
[DeleteEventBusResponse] -> ShowS
DeleteEventBusResponse -> String
(Int -> DeleteEventBusResponse -> ShowS)
-> (DeleteEventBusResponse -> String)
-> ([DeleteEventBusResponse] -> ShowS)
-> Show DeleteEventBusResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteEventBusResponse] -> ShowS
$cshowList :: [DeleteEventBusResponse] -> ShowS
show :: DeleteEventBusResponse -> String
$cshow :: DeleteEventBusResponse -> String
showsPrec :: Int -> DeleteEventBusResponse -> ShowS
$cshowsPrec :: Int -> DeleteEventBusResponse -> ShowS
Prelude.Show, (forall x. DeleteEventBusResponse -> Rep DeleteEventBusResponse x)
-> (forall x.
Rep DeleteEventBusResponse x -> DeleteEventBusResponse)
-> Generic DeleteEventBusResponse
forall x. Rep DeleteEventBusResponse x -> DeleteEventBusResponse
forall x. DeleteEventBusResponse -> Rep DeleteEventBusResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteEventBusResponse x -> DeleteEventBusResponse
$cfrom :: forall x. DeleteEventBusResponse -> Rep DeleteEventBusResponse x
Prelude.Generic)
newDeleteEventBusResponse ::
DeleteEventBusResponse
newDeleteEventBusResponse :: DeleteEventBusResponse
newDeleteEventBusResponse = DeleteEventBusResponse
DeleteEventBusResponse'
instance Prelude.NFData DeleteEventBusResponse