{-# 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.DeleteDocumentationVersion
(
DeleteDocumentationVersion (..),
newDeleteDocumentationVersion,
deleteDocumentationVersion_restApiId,
deleteDocumentationVersion_documentationVersion,
DeleteDocumentationVersionResponse (..),
newDeleteDocumentationVersionResponse,
)
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 DeleteDocumentationVersion = DeleteDocumentationVersion'
{
DeleteDocumentationVersion -> Text
restApiId :: Prelude.Text,
DeleteDocumentationVersion -> Text
documentationVersion :: Prelude.Text
}
deriving (DeleteDocumentationVersion -> DeleteDocumentationVersion -> Bool
(DeleteDocumentationVersion -> DeleteDocumentationVersion -> Bool)
-> (DeleteDocumentationVersion
-> DeleteDocumentationVersion -> Bool)
-> Eq DeleteDocumentationVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDocumentationVersion -> DeleteDocumentationVersion -> Bool
$c/= :: DeleteDocumentationVersion -> DeleteDocumentationVersion -> Bool
== :: DeleteDocumentationVersion -> DeleteDocumentationVersion -> Bool
$c== :: DeleteDocumentationVersion -> DeleteDocumentationVersion -> Bool
Prelude.Eq, ReadPrec [DeleteDocumentationVersion]
ReadPrec DeleteDocumentationVersion
Int -> ReadS DeleteDocumentationVersion
ReadS [DeleteDocumentationVersion]
(Int -> ReadS DeleteDocumentationVersion)
-> ReadS [DeleteDocumentationVersion]
-> ReadPrec DeleteDocumentationVersion
-> ReadPrec [DeleteDocumentationVersion]
-> Read DeleteDocumentationVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDocumentationVersion]
$creadListPrec :: ReadPrec [DeleteDocumentationVersion]
readPrec :: ReadPrec DeleteDocumentationVersion
$creadPrec :: ReadPrec DeleteDocumentationVersion
readList :: ReadS [DeleteDocumentationVersion]
$creadList :: ReadS [DeleteDocumentationVersion]
readsPrec :: Int -> ReadS DeleteDocumentationVersion
$creadsPrec :: Int -> ReadS DeleteDocumentationVersion
Prelude.Read, Int -> DeleteDocumentationVersion -> ShowS
[DeleteDocumentationVersion] -> ShowS
DeleteDocumentationVersion -> String
(Int -> DeleteDocumentationVersion -> ShowS)
-> (DeleteDocumentationVersion -> String)
-> ([DeleteDocumentationVersion] -> ShowS)
-> Show DeleteDocumentationVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDocumentationVersion] -> ShowS
$cshowList :: [DeleteDocumentationVersion] -> ShowS
show :: DeleteDocumentationVersion -> String
$cshow :: DeleteDocumentationVersion -> String
showsPrec :: Int -> DeleteDocumentationVersion -> ShowS
$cshowsPrec :: Int -> DeleteDocumentationVersion -> ShowS
Prelude.Show, (forall x.
DeleteDocumentationVersion -> Rep DeleteDocumentationVersion x)
-> (forall x.
Rep DeleteDocumentationVersion x -> DeleteDocumentationVersion)
-> Generic DeleteDocumentationVersion
forall x.
Rep DeleteDocumentationVersion x -> DeleteDocumentationVersion
forall x.
DeleteDocumentationVersion -> Rep DeleteDocumentationVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteDocumentationVersion x -> DeleteDocumentationVersion
$cfrom :: forall x.
DeleteDocumentationVersion -> Rep DeleteDocumentationVersion x
Prelude.Generic)
newDeleteDocumentationVersion ::
Prelude.Text ->
Prelude.Text ->
DeleteDocumentationVersion
newDeleteDocumentationVersion :: Text -> Text -> DeleteDocumentationVersion
newDeleteDocumentationVersion
Text
pRestApiId_
Text
pDocumentationVersion_ =
DeleteDocumentationVersion' :: Text -> Text -> DeleteDocumentationVersion
DeleteDocumentationVersion'
{ $sel:restApiId:DeleteDocumentationVersion' :: Text
restApiId =
Text
pRestApiId_,
$sel:documentationVersion:DeleteDocumentationVersion' :: Text
documentationVersion = Text
pDocumentationVersion_
}
deleteDocumentationVersion_restApiId :: Lens.Lens' DeleteDocumentationVersion Prelude.Text
deleteDocumentationVersion_restApiId :: (Text -> f Text)
-> DeleteDocumentationVersion -> f DeleteDocumentationVersion
deleteDocumentationVersion_restApiId = (DeleteDocumentationVersion -> Text)
-> (DeleteDocumentationVersion
-> Text -> DeleteDocumentationVersion)
-> Lens
DeleteDocumentationVersion DeleteDocumentationVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDocumentationVersion' {Text
restApiId :: Text
$sel:restApiId:DeleteDocumentationVersion' :: DeleteDocumentationVersion -> Text
restApiId} -> Text
restApiId) (\s :: DeleteDocumentationVersion
s@DeleteDocumentationVersion' {} Text
a -> DeleteDocumentationVersion
s {$sel:restApiId:DeleteDocumentationVersion' :: Text
restApiId = Text
a} :: DeleteDocumentationVersion)
deleteDocumentationVersion_documentationVersion :: Lens.Lens' DeleteDocumentationVersion Prelude.Text
deleteDocumentationVersion_documentationVersion :: (Text -> f Text)
-> DeleteDocumentationVersion -> f DeleteDocumentationVersion
deleteDocumentationVersion_documentationVersion = (DeleteDocumentationVersion -> Text)
-> (DeleteDocumentationVersion
-> Text -> DeleteDocumentationVersion)
-> Lens
DeleteDocumentationVersion DeleteDocumentationVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDocumentationVersion' {Text
documentationVersion :: Text
$sel:documentationVersion:DeleteDocumentationVersion' :: DeleteDocumentationVersion -> Text
documentationVersion} -> Text
documentationVersion) (\s :: DeleteDocumentationVersion
s@DeleteDocumentationVersion' {} Text
a -> DeleteDocumentationVersion
s {$sel:documentationVersion:DeleteDocumentationVersion' :: Text
documentationVersion = Text
a} :: DeleteDocumentationVersion)
instance Core.AWSRequest DeleteDocumentationVersion where
type
AWSResponse DeleteDocumentationVersion =
DeleteDocumentationVersionResponse
request :: DeleteDocumentationVersion -> Request DeleteDocumentationVersion
request = Service
-> DeleteDocumentationVersion -> Request DeleteDocumentationVersion
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteDocumentationVersion
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteDocumentationVersion)))
response =
AWSResponse DeleteDocumentationVersion
-> Logger
-> Service
-> Proxy DeleteDocumentationVersion
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteDocumentationVersion)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteDocumentationVersion
DeleteDocumentationVersionResponse
DeleteDocumentationVersionResponse'
instance Prelude.Hashable DeleteDocumentationVersion
instance Prelude.NFData DeleteDocumentationVersion
instance Core.ToHeaders DeleteDocumentationVersion where
toHeaders :: DeleteDocumentationVersion -> [Header]
toHeaders =
[Header] -> DeleteDocumentationVersion -> [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 DeleteDocumentationVersion where
toPath :: DeleteDocumentationVersion -> ByteString
toPath DeleteDocumentationVersion' {Text
documentationVersion :: Text
restApiId :: Text
$sel:documentationVersion:DeleteDocumentationVersion' :: DeleteDocumentationVersion -> Text
$sel:restApiId:DeleteDocumentationVersion' :: DeleteDocumentationVersion -> 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
"/documentation/versions/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
documentationVersion
]
instance Core.ToQuery DeleteDocumentationVersion where
toQuery :: DeleteDocumentationVersion -> QueryString
toQuery = QueryString -> DeleteDocumentationVersion -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteDocumentationVersionResponse = DeleteDocumentationVersionResponse'
{
}
deriving (DeleteDocumentationVersionResponse
-> DeleteDocumentationVersionResponse -> Bool
(DeleteDocumentationVersionResponse
-> DeleteDocumentationVersionResponse -> Bool)
-> (DeleteDocumentationVersionResponse
-> DeleteDocumentationVersionResponse -> Bool)
-> Eq DeleteDocumentationVersionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDocumentationVersionResponse
-> DeleteDocumentationVersionResponse -> Bool
$c/= :: DeleteDocumentationVersionResponse
-> DeleteDocumentationVersionResponse -> Bool
== :: DeleteDocumentationVersionResponse
-> DeleteDocumentationVersionResponse -> Bool
$c== :: DeleteDocumentationVersionResponse
-> DeleteDocumentationVersionResponse -> Bool
Prelude.Eq, ReadPrec [DeleteDocumentationVersionResponse]
ReadPrec DeleteDocumentationVersionResponse
Int -> ReadS DeleteDocumentationVersionResponse
ReadS [DeleteDocumentationVersionResponse]
(Int -> ReadS DeleteDocumentationVersionResponse)
-> ReadS [DeleteDocumentationVersionResponse]
-> ReadPrec DeleteDocumentationVersionResponse
-> ReadPrec [DeleteDocumentationVersionResponse]
-> Read DeleteDocumentationVersionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDocumentationVersionResponse]
$creadListPrec :: ReadPrec [DeleteDocumentationVersionResponse]
readPrec :: ReadPrec DeleteDocumentationVersionResponse
$creadPrec :: ReadPrec DeleteDocumentationVersionResponse
readList :: ReadS [DeleteDocumentationVersionResponse]
$creadList :: ReadS [DeleteDocumentationVersionResponse]
readsPrec :: Int -> ReadS DeleteDocumentationVersionResponse
$creadsPrec :: Int -> ReadS DeleteDocumentationVersionResponse
Prelude.Read, Int -> DeleteDocumentationVersionResponse -> ShowS
[DeleteDocumentationVersionResponse] -> ShowS
DeleteDocumentationVersionResponse -> String
(Int -> DeleteDocumentationVersionResponse -> ShowS)
-> (DeleteDocumentationVersionResponse -> String)
-> ([DeleteDocumentationVersionResponse] -> ShowS)
-> Show DeleteDocumentationVersionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDocumentationVersionResponse] -> ShowS
$cshowList :: [DeleteDocumentationVersionResponse] -> ShowS
show :: DeleteDocumentationVersionResponse -> String
$cshow :: DeleteDocumentationVersionResponse -> String
showsPrec :: Int -> DeleteDocumentationVersionResponse -> ShowS
$cshowsPrec :: Int -> DeleteDocumentationVersionResponse -> ShowS
Prelude.Show, (forall x.
DeleteDocumentationVersionResponse
-> Rep DeleteDocumentationVersionResponse x)
-> (forall x.
Rep DeleteDocumentationVersionResponse x
-> DeleteDocumentationVersionResponse)
-> Generic DeleteDocumentationVersionResponse
forall x.
Rep DeleteDocumentationVersionResponse x
-> DeleteDocumentationVersionResponse
forall x.
DeleteDocumentationVersionResponse
-> Rep DeleteDocumentationVersionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteDocumentationVersionResponse x
-> DeleteDocumentationVersionResponse
$cfrom :: forall x.
DeleteDocumentationVersionResponse
-> Rep DeleteDocumentationVersionResponse x
Prelude.Generic)
newDeleteDocumentationVersionResponse ::
DeleteDocumentationVersionResponse
newDeleteDocumentationVersionResponse :: DeleteDocumentationVersionResponse
newDeleteDocumentationVersionResponse =
DeleteDocumentationVersionResponse
DeleteDocumentationVersionResponse'
instance
Prelude.NFData
DeleteDocumentationVersionResponse