{-# 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.APIGateway.DeleteDeployment
(
DeleteDeployment (..),
newDeleteDeployment,
deleteDeployment_restApiId,
deleteDeployment_deploymentId,
DeleteDeploymentResponse (..),
newDeleteDeploymentResponse,
)
where
import Amazonka.APIGateway.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 DeleteDeployment = DeleteDeployment'
{
DeleteDeployment -> Text
restApiId :: Prelude.Text,
DeleteDeployment -> Text
deploymentId :: Prelude.Text
}
deriving (DeleteDeployment -> DeleteDeployment -> Bool
(DeleteDeployment -> DeleteDeployment -> Bool)
-> (DeleteDeployment -> DeleteDeployment -> Bool)
-> Eq DeleteDeployment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDeployment -> DeleteDeployment -> Bool
$c/= :: DeleteDeployment -> DeleteDeployment -> Bool
== :: DeleteDeployment -> DeleteDeployment -> Bool
$c== :: DeleteDeployment -> DeleteDeployment -> Bool
Prelude.Eq, ReadPrec [DeleteDeployment]
ReadPrec DeleteDeployment
Int -> ReadS DeleteDeployment
ReadS [DeleteDeployment]
(Int -> ReadS DeleteDeployment)
-> ReadS [DeleteDeployment]
-> ReadPrec DeleteDeployment
-> ReadPrec [DeleteDeployment]
-> Read DeleteDeployment
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDeployment]
$creadListPrec :: ReadPrec [DeleteDeployment]
readPrec :: ReadPrec DeleteDeployment
$creadPrec :: ReadPrec DeleteDeployment
readList :: ReadS [DeleteDeployment]
$creadList :: ReadS [DeleteDeployment]
readsPrec :: Int -> ReadS DeleteDeployment
$creadsPrec :: Int -> ReadS DeleteDeployment
Prelude.Read, Int -> DeleteDeployment -> ShowS
[DeleteDeployment] -> ShowS
DeleteDeployment -> String
(Int -> DeleteDeployment -> ShowS)
-> (DeleteDeployment -> String)
-> ([DeleteDeployment] -> ShowS)
-> Show DeleteDeployment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDeployment] -> ShowS
$cshowList :: [DeleteDeployment] -> ShowS
show :: DeleteDeployment -> String
$cshow :: DeleteDeployment -> String
showsPrec :: Int -> DeleteDeployment -> ShowS
$cshowsPrec :: Int -> DeleteDeployment -> ShowS
Prelude.Show, (forall x. DeleteDeployment -> Rep DeleteDeployment x)
-> (forall x. Rep DeleteDeployment x -> DeleteDeployment)
-> Generic DeleteDeployment
forall x. Rep DeleteDeployment x -> DeleteDeployment
forall x. DeleteDeployment -> Rep DeleteDeployment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteDeployment x -> DeleteDeployment
$cfrom :: forall x. DeleteDeployment -> Rep DeleteDeployment x
Prelude.Generic)
newDeleteDeployment ::
Prelude.Text ->
Prelude.Text ->
DeleteDeployment
newDeleteDeployment :: Text -> Text -> DeleteDeployment
newDeleteDeployment Text
pRestApiId_ Text
pDeploymentId_ =
DeleteDeployment' :: Text -> Text -> DeleteDeployment
DeleteDeployment'
{ $sel:restApiId:DeleteDeployment' :: Text
restApiId = Text
pRestApiId_,
$sel:deploymentId:DeleteDeployment' :: Text
deploymentId = Text
pDeploymentId_
}
deleteDeployment_restApiId :: Lens.Lens' DeleteDeployment Prelude.Text
deleteDeployment_restApiId :: (Text -> f Text) -> DeleteDeployment -> f DeleteDeployment
deleteDeployment_restApiId = (DeleteDeployment -> Text)
-> (DeleteDeployment -> Text -> DeleteDeployment)
-> Lens DeleteDeployment DeleteDeployment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDeployment' {Text
restApiId :: Text
$sel:restApiId:DeleteDeployment' :: DeleteDeployment -> Text
restApiId} -> Text
restApiId) (\s :: DeleteDeployment
s@DeleteDeployment' {} Text
a -> DeleteDeployment
s {$sel:restApiId:DeleteDeployment' :: Text
restApiId = Text
a} :: DeleteDeployment)
deleteDeployment_deploymentId :: Lens.Lens' DeleteDeployment Prelude.Text
deleteDeployment_deploymentId :: (Text -> f Text) -> DeleteDeployment -> f DeleteDeployment
deleteDeployment_deploymentId = (DeleteDeployment -> Text)
-> (DeleteDeployment -> Text -> DeleteDeployment)
-> Lens DeleteDeployment DeleteDeployment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDeployment' {Text
deploymentId :: Text
$sel:deploymentId:DeleteDeployment' :: DeleteDeployment -> Text
deploymentId} -> Text
deploymentId) (\s :: DeleteDeployment
s@DeleteDeployment' {} Text
a -> DeleteDeployment
s {$sel:deploymentId:DeleteDeployment' :: Text
deploymentId = Text
a} :: DeleteDeployment)
instance Core.AWSRequest DeleteDeployment where
type
AWSResponse DeleteDeployment =
DeleteDeploymentResponse
request :: DeleteDeployment -> Request DeleteDeployment
request = Service -> DeleteDeployment -> Request DeleteDeployment
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteDeployment
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteDeployment)))
response =
AWSResponse DeleteDeployment
-> Logger
-> Service
-> Proxy DeleteDeployment
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteDeployment)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteDeployment
DeleteDeploymentResponse
DeleteDeploymentResponse'
instance Prelude.Hashable DeleteDeployment
instance Prelude.NFData DeleteDeployment
instance Core.ToHeaders DeleteDeployment where
toHeaders :: DeleteDeployment -> [Header]
toHeaders =
[Header] -> DeleteDeployment -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Accept"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# (ByteString
"application/json" :: Prelude.ByteString)
]
)
instance Core.ToPath DeleteDeployment where
toPath :: DeleteDeployment -> ByteString
toPath DeleteDeployment' {Text
deploymentId :: Text
restApiId :: Text
$sel:deploymentId:DeleteDeployment' :: DeleteDeployment -> Text
$sel:restApiId:DeleteDeployment' :: DeleteDeployment -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/restapis/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
restApiId,
ByteString
"/deployments/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
deploymentId
]
instance Core.ToQuery DeleteDeployment where
toQuery :: DeleteDeployment -> QueryString
toQuery = QueryString -> DeleteDeployment -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteDeploymentResponse = DeleteDeploymentResponse'
{
}
deriving (DeleteDeploymentResponse -> DeleteDeploymentResponse -> Bool
(DeleteDeploymentResponse -> DeleteDeploymentResponse -> Bool)
-> (DeleteDeploymentResponse -> DeleteDeploymentResponse -> Bool)
-> Eq DeleteDeploymentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDeploymentResponse -> DeleteDeploymentResponse -> Bool
$c/= :: DeleteDeploymentResponse -> DeleteDeploymentResponse -> Bool
== :: DeleteDeploymentResponse -> DeleteDeploymentResponse -> Bool
$c== :: DeleteDeploymentResponse -> DeleteDeploymentResponse -> Bool
Prelude.Eq, ReadPrec [DeleteDeploymentResponse]
ReadPrec DeleteDeploymentResponse
Int -> ReadS DeleteDeploymentResponse
ReadS [DeleteDeploymentResponse]
(Int -> ReadS DeleteDeploymentResponse)
-> ReadS [DeleteDeploymentResponse]
-> ReadPrec DeleteDeploymentResponse
-> ReadPrec [DeleteDeploymentResponse]
-> Read DeleteDeploymentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDeploymentResponse]
$creadListPrec :: ReadPrec [DeleteDeploymentResponse]
readPrec :: ReadPrec DeleteDeploymentResponse
$creadPrec :: ReadPrec DeleteDeploymentResponse
readList :: ReadS [DeleteDeploymentResponse]
$creadList :: ReadS [DeleteDeploymentResponse]
readsPrec :: Int -> ReadS DeleteDeploymentResponse
$creadsPrec :: Int -> ReadS DeleteDeploymentResponse
Prelude.Read, Int -> DeleteDeploymentResponse -> ShowS
[DeleteDeploymentResponse] -> ShowS
DeleteDeploymentResponse -> String
(Int -> DeleteDeploymentResponse -> ShowS)
-> (DeleteDeploymentResponse -> String)
-> ([DeleteDeploymentResponse] -> ShowS)
-> Show DeleteDeploymentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDeploymentResponse] -> ShowS
$cshowList :: [DeleteDeploymentResponse] -> ShowS
show :: DeleteDeploymentResponse -> String
$cshow :: DeleteDeploymentResponse -> String
showsPrec :: Int -> DeleteDeploymentResponse -> ShowS
$cshowsPrec :: Int -> DeleteDeploymentResponse -> ShowS
Prelude.Show, (forall x.
DeleteDeploymentResponse -> Rep DeleteDeploymentResponse x)
-> (forall x.
Rep DeleteDeploymentResponse x -> DeleteDeploymentResponse)
-> Generic DeleteDeploymentResponse
forall x.
Rep DeleteDeploymentResponse x -> DeleteDeploymentResponse
forall x.
DeleteDeploymentResponse -> Rep DeleteDeploymentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteDeploymentResponse x -> DeleteDeploymentResponse
$cfrom :: forall x.
DeleteDeploymentResponse -> Rep DeleteDeploymentResponse x
Prelude.Generic)
newDeleteDeploymentResponse ::
DeleteDeploymentResponse
newDeleteDeploymentResponse :: DeleteDeploymentResponse
newDeleteDeploymentResponse =
DeleteDeploymentResponse
DeleteDeploymentResponse'
instance Prelude.NFData DeleteDeploymentResponse