{-# 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.SNS.DeleteEndpoint
(
DeleteEndpoint (..),
newDeleteEndpoint,
deleteEndpoint_endpointArn,
DeleteEndpointResponse (..),
newDeleteEndpointResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SNS.Types
data DeleteEndpoint = DeleteEndpoint'
{
DeleteEndpoint -> Text
endpointArn :: Prelude.Text
}
deriving (DeleteEndpoint -> DeleteEndpoint -> Bool
(DeleteEndpoint -> DeleteEndpoint -> Bool)
-> (DeleteEndpoint -> DeleteEndpoint -> Bool) -> Eq DeleteEndpoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeleteEndpoint -> DeleteEndpoint -> Bool
== :: DeleteEndpoint -> DeleteEndpoint -> Bool
$c/= :: DeleteEndpoint -> DeleteEndpoint -> Bool
/= :: DeleteEndpoint -> DeleteEndpoint -> Bool
Prelude.Eq, ReadPrec [DeleteEndpoint]
ReadPrec DeleteEndpoint
Int -> ReadS DeleteEndpoint
ReadS [DeleteEndpoint]
(Int -> ReadS DeleteEndpoint)
-> ReadS [DeleteEndpoint]
-> ReadPrec DeleteEndpoint
-> ReadPrec [DeleteEndpoint]
-> Read DeleteEndpoint
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS DeleteEndpoint
readsPrec :: Int -> ReadS DeleteEndpoint
$creadList :: ReadS [DeleteEndpoint]
readList :: ReadS [DeleteEndpoint]
$creadPrec :: ReadPrec DeleteEndpoint
readPrec :: ReadPrec DeleteEndpoint
$creadListPrec :: ReadPrec [DeleteEndpoint]
readListPrec :: ReadPrec [DeleteEndpoint]
Prelude.Read, Int -> DeleteEndpoint -> ShowS
[DeleteEndpoint] -> ShowS
DeleteEndpoint -> String
(Int -> DeleteEndpoint -> ShowS)
-> (DeleteEndpoint -> String)
-> ([DeleteEndpoint] -> ShowS)
-> Show DeleteEndpoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DeleteEndpoint -> ShowS
showsPrec :: Int -> DeleteEndpoint -> ShowS
$cshow :: DeleteEndpoint -> String
show :: DeleteEndpoint -> String
$cshowList :: [DeleteEndpoint] -> ShowS
showList :: [DeleteEndpoint] -> ShowS
Prelude.Show, (forall x. DeleteEndpoint -> Rep DeleteEndpoint x)
-> (forall x. Rep DeleteEndpoint x -> DeleteEndpoint)
-> Generic DeleteEndpoint
forall x. Rep DeleteEndpoint x -> DeleteEndpoint
forall x. DeleteEndpoint -> Rep DeleteEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. DeleteEndpoint -> Rep DeleteEndpoint x
from :: forall x. DeleteEndpoint -> Rep DeleteEndpoint x
$cto :: forall x. Rep DeleteEndpoint x -> DeleteEndpoint
to :: forall x. Rep DeleteEndpoint x -> DeleteEndpoint
Prelude.Generic)
newDeleteEndpoint ::
Prelude.Text ->
DeleteEndpoint
newDeleteEndpoint :: Text -> DeleteEndpoint
newDeleteEndpoint Text
pEndpointArn_ =
DeleteEndpoint' {endpointArn :: Text
endpointArn = Text
pEndpointArn_}
deleteEndpoint_endpointArn :: Lens.Lens' DeleteEndpoint Prelude.Text
deleteEndpoint_endpointArn :: Lens' DeleteEndpoint Text
deleteEndpoint_endpointArn = (DeleteEndpoint -> Text)
-> (DeleteEndpoint -> Text -> DeleteEndpoint)
-> Lens' DeleteEndpoint Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteEndpoint' {Text
endpointArn :: DeleteEndpoint -> Text
endpointArn :: Text
endpointArn} -> Text
endpointArn) (\s :: DeleteEndpoint
s@DeleteEndpoint' {} Text
a -> DeleteEndpoint
s {endpointArn = a} :: DeleteEndpoint)
instance Core.AWSRequest DeleteEndpoint where
type
AWSResponse DeleteEndpoint =
DeleteEndpointResponse
request :: (Service -> Service) -> DeleteEndpoint -> Request DeleteEndpoint
request Service -> Service
overrides =
Service -> DeleteEndpoint -> Request DeleteEndpoint
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteEndpoint
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteEndpoint)))
response =
AWSResponse DeleteEndpoint
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteEndpoint
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteEndpoint)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteEndpoint
DeleteEndpointResponse
DeleteEndpointResponse'
instance Prelude.Hashable DeleteEndpoint where
hashWithSalt :: Int -> DeleteEndpoint -> Int
hashWithSalt Int
_salt DeleteEndpoint' {Text
endpointArn :: DeleteEndpoint -> Text
endpointArn :: Text
..} =
Int
_salt Int -> Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
endpointArn
instance Prelude.NFData DeleteEndpoint where
rnf :: DeleteEndpoint -> ()
rnf DeleteEndpoint' {Text
endpointArn :: DeleteEndpoint -> Text
endpointArn :: Text
..} = Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
endpointArn
instance Data.ToHeaders DeleteEndpoint where
toHeaders :: DeleteEndpoint -> [Header]
toHeaders = [Header] -> DeleteEndpoint -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DeleteEndpoint where
toPath :: DeleteEndpoint -> ByteString
toPath = ByteString -> DeleteEndpoint -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteEndpoint where
toQuery :: DeleteEndpoint -> QueryString
toQuery DeleteEndpoint' {Text
endpointArn :: DeleteEndpoint -> Text
endpointArn :: Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DeleteEndpoint" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-03-31" :: Prelude.ByteString),
ByteString
"EndpointArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
endpointArn
]
data DeleteEndpointResponse = DeleteEndpointResponse'
{
}
deriving (DeleteEndpointResponse -> DeleteEndpointResponse -> Bool
(DeleteEndpointResponse -> DeleteEndpointResponse -> Bool)
-> (DeleteEndpointResponse -> DeleteEndpointResponse -> Bool)
-> Eq DeleteEndpointResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeleteEndpointResponse -> DeleteEndpointResponse -> Bool
== :: DeleteEndpointResponse -> DeleteEndpointResponse -> Bool
$c/= :: DeleteEndpointResponse -> DeleteEndpointResponse -> Bool
/= :: DeleteEndpointResponse -> DeleteEndpointResponse -> Bool
Prelude.Eq, ReadPrec [DeleteEndpointResponse]
ReadPrec DeleteEndpointResponse
Int -> ReadS DeleteEndpointResponse
ReadS [DeleteEndpointResponse]
(Int -> ReadS DeleteEndpointResponse)
-> ReadS [DeleteEndpointResponse]
-> ReadPrec DeleteEndpointResponse
-> ReadPrec [DeleteEndpointResponse]
-> Read DeleteEndpointResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS DeleteEndpointResponse
readsPrec :: Int -> ReadS DeleteEndpointResponse
$creadList :: ReadS [DeleteEndpointResponse]
readList :: ReadS [DeleteEndpointResponse]
$creadPrec :: ReadPrec DeleteEndpointResponse
readPrec :: ReadPrec DeleteEndpointResponse
$creadListPrec :: ReadPrec [DeleteEndpointResponse]
readListPrec :: ReadPrec [DeleteEndpointResponse]
Prelude.Read, Int -> DeleteEndpointResponse -> ShowS
[DeleteEndpointResponse] -> ShowS
DeleteEndpointResponse -> String
(Int -> DeleteEndpointResponse -> ShowS)
-> (DeleteEndpointResponse -> String)
-> ([DeleteEndpointResponse] -> ShowS)
-> Show DeleteEndpointResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DeleteEndpointResponse -> ShowS
showsPrec :: Int -> DeleteEndpointResponse -> ShowS
$cshow :: DeleteEndpointResponse -> String
show :: DeleteEndpointResponse -> String
$cshowList :: [DeleteEndpointResponse] -> ShowS
showList :: [DeleteEndpointResponse] -> ShowS
Prelude.Show, (forall x. DeleteEndpointResponse -> Rep DeleteEndpointResponse x)
-> (forall x.
Rep DeleteEndpointResponse x -> DeleteEndpointResponse)
-> Generic DeleteEndpointResponse
forall x. Rep DeleteEndpointResponse x -> DeleteEndpointResponse
forall x. DeleteEndpointResponse -> Rep DeleteEndpointResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. DeleteEndpointResponse -> Rep DeleteEndpointResponse x
from :: forall x. DeleteEndpointResponse -> Rep DeleteEndpointResponse x
$cto :: forall x. Rep DeleteEndpointResponse x -> DeleteEndpointResponse
to :: forall x. Rep DeleteEndpointResponse x -> DeleteEndpointResponse
Prelude.Generic)
newDeleteEndpointResponse ::
DeleteEndpointResponse
newDeleteEndpointResponse :: DeleteEndpointResponse
newDeleteEndpointResponse = DeleteEndpointResponse
DeleteEndpointResponse'
instance Prelude.NFData DeleteEndpointResponse where
rnf :: DeleteEndpointResponse -> ()
rnf DeleteEndpointResponse
_ = ()