{-# 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.Glue.DeleteDevEndpoint
(
DeleteDevEndpoint (..),
newDeleteDevEndpoint,
deleteDevEndpoint_endpointName,
DeleteDevEndpointResponse (..),
newDeleteDevEndpointResponse,
deleteDevEndpointResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Glue.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 DeleteDevEndpoint = DeleteDevEndpoint'
{
DeleteDevEndpoint -> Text
endpointName :: Prelude.Text
}
deriving (DeleteDevEndpoint -> DeleteDevEndpoint -> Bool
(DeleteDevEndpoint -> DeleteDevEndpoint -> Bool)
-> (DeleteDevEndpoint -> DeleteDevEndpoint -> Bool)
-> Eq DeleteDevEndpoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDevEndpoint -> DeleteDevEndpoint -> Bool
$c/= :: DeleteDevEndpoint -> DeleteDevEndpoint -> Bool
== :: DeleteDevEndpoint -> DeleteDevEndpoint -> Bool
$c== :: DeleteDevEndpoint -> DeleteDevEndpoint -> Bool
Prelude.Eq, ReadPrec [DeleteDevEndpoint]
ReadPrec DeleteDevEndpoint
Int -> ReadS DeleteDevEndpoint
ReadS [DeleteDevEndpoint]
(Int -> ReadS DeleteDevEndpoint)
-> ReadS [DeleteDevEndpoint]
-> ReadPrec DeleteDevEndpoint
-> ReadPrec [DeleteDevEndpoint]
-> Read DeleteDevEndpoint
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDevEndpoint]
$creadListPrec :: ReadPrec [DeleteDevEndpoint]
readPrec :: ReadPrec DeleteDevEndpoint
$creadPrec :: ReadPrec DeleteDevEndpoint
readList :: ReadS [DeleteDevEndpoint]
$creadList :: ReadS [DeleteDevEndpoint]
readsPrec :: Int -> ReadS DeleteDevEndpoint
$creadsPrec :: Int -> ReadS DeleteDevEndpoint
Prelude.Read, Int -> DeleteDevEndpoint -> ShowS
[DeleteDevEndpoint] -> ShowS
DeleteDevEndpoint -> String
(Int -> DeleteDevEndpoint -> ShowS)
-> (DeleteDevEndpoint -> String)
-> ([DeleteDevEndpoint] -> ShowS)
-> Show DeleteDevEndpoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDevEndpoint] -> ShowS
$cshowList :: [DeleteDevEndpoint] -> ShowS
show :: DeleteDevEndpoint -> String
$cshow :: DeleteDevEndpoint -> String
showsPrec :: Int -> DeleteDevEndpoint -> ShowS
$cshowsPrec :: Int -> DeleteDevEndpoint -> ShowS
Prelude.Show, (forall x. DeleteDevEndpoint -> Rep DeleteDevEndpoint x)
-> (forall x. Rep DeleteDevEndpoint x -> DeleteDevEndpoint)
-> Generic DeleteDevEndpoint
forall x. Rep DeleteDevEndpoint x -> DeleteDevEndpoint
forall x. DeleteDevEndpoint -> Rep DeleteDevEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteDevEndpoint x -> DeleteDevEndpoint
$cfrom :: forall x. DeleteDevEndpoint -> Rep DeleteDevEndpoint x
Prelude.Generic)
newDeleteDevEndpoint ::
Prelude.Text ->
DeleteDevEndpoint
newDeleteDevEndpoint :: Text -> DeleteDevEndpoint
newDeleteDevEndpoint Text
pEndpointName_ =
DeleteDevEndpoint' :: Text -> DeleteDevEndpoint
DeleteDevEndpoint' {$sel:endpointName:DeleteDevEndpoint' :: Text
endpointName = Text
pEndpointName_}
deleteDevEndpoint_endpointName :: Lens.Lens' DeleteDevEndpoint Prelude.Text
deleteDevEndpoint_endpointName :: (Text -> f Text) -> DeleteDevEndpoint -> f DeleteDevEndpoint
deleteDevEndpoint_endpointName = (DeleteDevEndpoint -> Text)
-> (DeleteDevEndpoint -> Text -> DeleteDevEndpoint)
-> Lens DeleteDevEndpoint DeleteDevEndpoint Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDevEndpoint' {Text
endpointName :: Text
$sel:endpointName:DeleteDevEndpoint' :: DeleteDevEndpoint -> Text
endpointName} -> Text
endpointName) (\s :: DeleteDevEndpoint
s@DeleteDevEndpoint' {} Text
a -> DeleteDevEndpoint
s {$sel:endpointName:DeleteDevEndpoint' :: Text
endpointName = Text
a} :: DeleteDevEndpoint)
instance Core.AWSRequest DeleteDevEndpoint where
type
AWSResponse DeleteDevEndpoint =
DeleteDevEndpointResponse
request :: DeleteDevEndpoint -> Request DeleteDevEndpoint
request = Service -> DeleteDevEndpoint -> Request DeleteDevEndpoint
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteDevEndpoint
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteDevEndpoint)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteDevEndpoint))
-> Logger
-> Service
-> Proxy DeleteDevEndpoint
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteDevEndpoint)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteDevEndpointResponse
DeleteDevEndpointResponse'
(Int -> DeleteDevEndpointResponse)
-> Either String Int -> Either String DeleteDevEndpointResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DeleteDevEndpoint
instance Prelude.NFData DeleteDevEndpoint
instance Core.ToHeaders DeleteDevEndpoint where
toHeaders :: DeleteDevEndpoint -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteDevEndpoint -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"AWSGlue.DeleteDevEndpoint" :: Prelude.ByteString),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DeleteDevEndpoint where
toJSON :: DeleteDevEndpoint -> Value
toJSON DeleteDevEndpoint' {Text
endpointName :: Text
$sel:endpointName:DeleteDevEndpoint' :: DeleteDevEndpoint -> 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
"EndpointName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
endpointName)]
)
instance Core.ToPath DeleteDevEndpoint where
toPath :: DeleteDevEndpoint -> ByteString
toPath = ByteString -> DeleteDevEndpoint -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteDevEndpoint where
toQuery :: DeleteDevEndpoint -> QueryString
toQuery = QueryString -> DeleteDevEndpoint -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteDevEndpointResponse = DeleteDevEndpointResponse'
{
DeleteDevEndpointResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteDevEndpointResponse -> DeleteDevEndpointResponse -> Bool
(DeleteDevEndpointResponse -> DeleteDevEndpointResponse -> Bool)
-> (DeleteDevEndpointResponse -> DeleteDevEndpointResponse -> Bool)
-> Eq DeleteDevEndpointResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDevEndpointResponse -> DeleteDevEndpointResponse -> Bool
$c/= :: DeleteDevEndpointResponse -> DeleteDevEndpointResponse -> Bool
== :: DeleteDevEndpointResponse -> DeleteDevEndpointResponse -> Bool
$c== :: DeleteDevEndpointResponse -> DeleteDevEndpointResponse -> Bool
Prelude.Eq, ReadPrec [DeleteDevEndpointResponse]
ReadPrec DeleteDevEndpointResponse
Int -> ReadS DeleteDevEndpointResponse
ReadS [DeleteDevEndpointResponse]
(Int -> ReadS DeleteDevEndpointResponse)
-> ReadS [DeleteDevEndpointResponse]
-> ReadPrec DeleteDevEndpointResponse
-> ReadPrec [DeleteDevEndpointResponse]
-> Read DeleteDevEndpointResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDevEndpointResponse]
$creadListPrec :: ReadPrec [DeleteDevEndpointResponse]
readPrec :: ReadPrec DeleteDevEndpointResponse
$creadPrec :: ReadPrec DeleteDevEndpointResponse
readList :: ReadS [DeleteDevEndpointResponse]
$creadList :: ReadS [DeleteDevEndpointResponse]
readsPrec :: Int -> ReadS DeleteDevEndpointResponse
$creadsPrec :: Int -> ReadS DeleteDevEndpointResponse
Prelude.Read, Int -> DeleteDevEndpointResponse -> ShowS
[DeleteDevEndpointResponse] -> ShowS
DeleteDevEndpointResponse -> String
(Int -> DeleteDevEndpointResponse -> ShowS)
-> (DeleteDevEndpointResponse -> String)
-> ([DeleteDevEndpointResponse] -> ShowS)
-> Show DeleteDevEndpointResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDevEndpointResponse] -> ShowS
$cshowList :: [DeleteDevEndpointResponse] -> ShowS
show :: DeleteDevEndpointResponse -> String
$cshow :: DeleteDevEndpointResponse -> String
showsPrec :: Int -> DeleteDevEndpointResponse -> ShowS
$cshowsPrec :: Int -> DeleteDevEndpointResponse -> ShowS
Prelude.Show, (forall x.
DeleteDevEndpointResponse -> Rep DeleteDevEndpointResponse x)
-> (forall x.
Rep DeleteDevEndpointResponse x -> DeleteDevEndpointResponse)
-> Generic DeleteDevEndpointResponse
forall x.
Rep DeleteDevEndpointResponse x -> DeleteDevEndpointResponse
forall x.
DeleteDevEndpointResponse -> Rep DeleteDevEndpointResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteDevEndpointResponse x -> DeleteDevEndpointResponse
$cfrom :: forall x.
DeleteDevEndpointResponse -> Rep DeleteDevEndpointResponse x
Prelude.Generic)
newDeleteDevEndpointResponse ::
Prelude.Int ->
DeleteDevEndpointResponse
newDeleteDevEndpointResponse :: Int -> DeleteDevEndpointResponse
newDeleteDevEndpointResponse Int
pHttpStatus_ =
DeleteDevEndpointResponse' :: Int -> DeleteDevEndpointResponse
DeleteDevEndpointResponse'
{ $sel:httpStatus:DeleteDevEndpointResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteDevEndpointResponse_httpStatus :: Lens.Lens' DeleteDevEndpointResponse Prelude.Int
deleteDevEndpointResponse_httpStatus :: (Int -> f Int)
-> DeleteDevEndpointResponse -> f DeleteDevEndpointResponse
deleteDevEndpointResponse_httpStatus = (DeleteDevEndpointResponse -> Int)
-> (DeleteDevEndpointResponse -> Int -> DeleteDevEndpointResponse)
-> Lens DeleteDevEndpointResponse DeleteDevEndpointResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDevEndpointResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteDevEndpointResponse' :: DeleteDevEndpointResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteDevEndpointResponse
s@DeleteDevEndpointResponse' {} Int
a -> DeleteDevEndpointResponse
s {$sel:httpStatus:DeleteDevEndpointResponse' :: Int
httpStatus = Int
a} :: DeleteDevEndpointResponse)
instance Prelude.NFData DeleteDevEndpointResponse