{-# 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.S3Outposts.DeleteEndpoint
(
DeleteEndpoint (..),
newDeleteEndpoint,
deleteEndpoint_endpointId,
deleteEndpoint_outpostId,
DeleteEndpointResponse (..),
newDeleteEndpointResponse,
)
where
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
import Amazonka.S3Outposts.Types
data DeleteEndpoint = DeleteEndpoint'
{
DeleteEndpoint -> Text
endpointId :: Prelude.Text,
DeleteEndpoint -> Text
outpostId :: Prelude.Text
}
deriving (DeleteEndpoint -> DeleteEndpoint -> Bool
(DeleteEndpoint -> DeleteEndpoint -> Bool)
-> (DeleteEndpoint -> DeleteEndpoint -> Bool) -> Eq DeleteEndpoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteEndpoint -> DeleteEndpoint -> Bool
$c/= :: DeleteEndpoint -> DeleteEndpoint -> Bool
== :: DeleteEndpoint -> DeleteEndpoint -> Bool
$c== :: 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
readListPrec :: ReadPrec [DeleteEndpoint]
$creadListPrec :: ReadPrec [DeleteEndpoint]
readPrec :: ReadPrec DeleteEndpoint
$creadPrec :: ReadPrec DeleteEndpoint
readList :: ReadS [DeleteEndpoint]
$creadList :: ReadS [DeleteEndpoint]
readsPrec :: Int -> ReadS DeleteEndpoint
$creadsPrec :: Int -> ReadS 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
showList :: [DeleteEndpoint] -> ShowS
$cshowList :: [DeleteEndpoint] -> ShowS
show :: DeleteEndpoint -> String
$cshow :: DeleteEndpoint -> String
showsPrec :: Int -> DeleteEndpoint -> ShowS
$cshowsPrec :: Int -> 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
$cto :: forall x. Rep DeleteEndpoint x -> DeleteEndpoint
$cfrom :: forall x. DeleteEndpoint -> Rep DeleteEndpoint x
Prelude.Generic)
newDeleteEndpoint ::
Prelude.Text ->
Prelude.Text ->
DeleteEndpoint
newDeleteEndpoint :: Text -> Text -> DeleteEndpoint
newDeleteEndpoint Text
pEndpointId_ Text
pOutpostId_ =
DeleteEndpoint' :: Text -> Text -> DeleteEndpoint
DeleteEndpoint'
{ $sel:endpointId:DeleteEndpoint' :: Text
endpointId = Text
pEndpointId_,
$sel:outpostId:DeleteEndpoint' :: Text
outpostId = Text
pOutpostId_
}
deleteEndpoint_endpointId :: Lens.Lens' DeleteEndpoint Prelude.Text
deleteEndpoint_endpointId :: (Text -> f Text) -> DeleteEndpoint -> f DeleteEndpoint
deleteEndpoint_endpointId = (DeleteEndpoint -> Text)
-> (DeleteEndpoint -> Text -> DeleteEndpoint)
-> Lens DeleteEndpoint DeleteEndpoint Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteEndpoint' {Text
endpointId :: Text
$sel:endpointId:DeleteEndpoint' :: DeleteEndpoint -> Text
endpointId} -> Text
endpointId) (\s :: DeleteEndpoint
s@DeleteEndpoint' {} Text
a -> DeleteEndpoint
s {$sel:endpointId:DeleteEndpoint' :: Text
endpointId = Text
a} :: DeleteEndpoint)
deleteEndpoint_outpostId :: Lens.Lens' DeleteEndpoint Prelude.Text
deleteEndpoint_outpostId :: (Text -> f Text) -> DeleteEndpoint -> f DeleteEndpoint
deleteEndpoint_outpostId = (DeleteEndpoint -> Text)
-> (DeleteEndpoint -> Text -> DeleteEndpoint)
-> Lens DeleteEndpoint DeleteEndpoint Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteEndpoint' {Text
outpostId :: Text
$sel:outpostId:DeleteEndpoint' :: DeleteEndpoint -> Text
outpostId} -> Text
outpostId) (\s :: DeleteEndpoint
s@DeleteEndpoint' {} Text
a -> DeleteEndpoint
s {$sel:outpostId:DeleteEndpoint' :: Text
outpostId = Text
a} :: DeleteEndpoint)
instance Core.AWSRequest DeleteEndpoint where
type
AWSResponse DeleteEndpoint =
DeleteEndpointResponse
request :: DeleteEndpoint -> Request DeleteEndpoint
request = Service -> DeleteEndpoint -> Request DeleteEndpoint
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteEndpoint
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteEndpoint)))
response =
AWSResponse DeleteEndpoint
-> Logger
-> Service
-> Proxy DeleteEndpoint
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteEndpoint)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteEndpoint
DeleteEndpointResponse
DeleteEndpointResponse'
instance Prelude.Hashable DeleteEndpoint
instance Prelude.NFData DeleteEndpoint
instance Core.ToHeaders DeleteEndpoint where
toHeaders :: DeleteEndpoint -> [Header]
toHeaders =
[Header] -> DeleteEndpoint -> [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 DeleteEndpoint where
toPath :: DeleteEndpoint -> ByteString
toPath = ByteString -> DeleteEndpoint -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/S3Outposts/DeleteEndpoint"
instance Core.ToQuery DeleteEndpoint where
toQuery :: DeleteEndpoint -> QueryString
toQuery DeleteEndpoint' {Text
outpostId :: Text
endpointId :: Text
$sel:outpostId:DeleteEndpoint' :: DeleteEndpoint -> Text
$sel:endpointId:DeleteEndpoint' :: DeleteEndpoint -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"endpointId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
endpointId,
ByteString
"outpostId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
outpostId
]
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
/= :: DeleteEndpointResponse -> DeleteEndpointResponse -> Bool
$c/= :: DeleteEndpointResponse -> DeleteEndpointResponse -> Bool
== :: DeleteEndpointResponse -> DeleteEndpointResponse -> Bool
$c== :: 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
readListPrec :: ReadPrec [DeleteEndpointResponse]
$creadListPrec :: ReadPrec [DeleteEndpointResponse]
readPrec :: ReadPrec DeleteEndpointResponse
$creadPrec :: ReadPrec DeleteEndpointResponse
readList :: ReadS [DeleteEndpointResponse]
$creadList :: ReadS [DeleteEndpointResponse]
readsPrec :: Int -> ReadS DeleteEndpointResponse
$creadsPrec :: Int -> ReadS 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
showList :: [DeleteEndpointResponse] -> ShowS
$cshowList :: [DeleteEndpointResponse] -> ShowS
show :: DeleteEndpointResponse -> String
$cshow :: DeleteEndpointResponse -> String
showsPrec :: Int -> DeleteEndpointResponse -> ShowS
$cshowsPrec :: Int -> 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
$cto :: forall x. Rep DeleteEndpointResponse x -> DeleteEndpointResponse
$cfrom :: forall x. DeleteEndpointResponse -> Rep DeleteEndpointResponse x
Prelude.Generic)
newDeleteEndpointResponse ::
DeleteEndpointResponse
newDeleteEndpointResponse :: DeleteEndpointResponse
newDeleteEndpointResponse = DeleteEndpointResponse
DeleteEndpointResponse'
instance Prelude.NFData DeleteEndpointResponse