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