{-# 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.ApiGatewayV2.DeleteRouteRequestParameter
(
DeleteRouteRequestParameter (..),
newDeleteRouteRequestParameter,
deleteRouteRequestParameter_requestParameterKey,
deleteRouteRequestParameter_apiId,
deleteRouteRequestParameter_routeId,
DeleteRouteRequestParameterResponse (..),
newDeleteRouteRequestParameterResponse,
)
where
import Amazonka.ApiGatewayV2.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 DeleteRouteRequestParameter = DeleteRouteRequestParameter'
{
DeleteRouteRequestParameter -> Text
requestParameterKey :: Prelude.Text,
DeleteRouteRequestParameter -> Text
apiId :: Prelude.Text,
DeleteRouteRequestParameter -> Text
routeId :: Prelude.Text
}
deriving (DeleteRouteRequestParameter -> DeleteRouteRequestParameter -> Bool
(DeleteRouteRequestParameter
-> DeleteRouteRequestParameter -> Bool)
-> (DeleteRouteRequestParameter
-> DeleteRouteRequestParameter -> Bool)
-> Eq DeleteRouteRequestParameter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRouteRequestParameter -> DeleteRouteRequestParameter -> Bool
$c/= :: DeleteRouteRequestParameter -> DeleteRouteRequestParameter -> Bool
== :: DeleteRouteRequestParameter -> DeleteRouteRequestParameter -> Bool
$c== :: DeleteRouteRequestParameter -> DeleteRouteRequestParameter -> Bool
Prelude.Eq, ReadPrec [DeleteRouteRequestParameter]
ReadPrec DeleteRouteRequestParameter
Int -> ReadS DeleteRouteRequestParameter
ReadS [DeleteRouteRequestParameter]
(Int -> ReadS DeleteRouteRequestParameter)
-> ReadS [DeleteRouteRequestParameter]
-> ReadPrec DeleteRouteRequestParameter
-> ReadPrec [DeleteRouteRequestParameter]
-> Read DeleteRouteRequestParameter
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRouteRequestParameter]
$creadListPrec :: ReadPrec [DeleteRouteRequestParameter]
readPrec :: ReadPrec DeleteRouteRequestParameter
$creadPrec :: ReadPrec DeleteRouteRequestParameter
readList :: ReadS [DeleteRouteRequestParameter]
$creadList :: ReadS [DeleteRouteRequestParameter]
readsPrec :: Int -> ReadS DeleteRouteRequestParameter
$creadsPrec :: Int -> ReadS DeleteRouteRequestParameter
Prelude.Read, Int -> DeleteRouteRequestParameter -> ShowS
[DeleteRouteRequestParameter] -> ShowS
DeleteRouteRequestParameter -> String
(Int -> DeleteRouteRequestParameter -> ShowS)
-> (DeleteRouteRequestParameter -> String)
-> ([DeleteRouteRequestParameter] -> ShowS)
-> Show DeleteRouteRequestParameter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRouteRequestParameter] -> ShowS
$cshowList :: [DeleteRouteRequestParameter] -> ShowS
show :: DeleteRouteRequestParameter -> String
$cshow :: DeleteRouteRequestParameter -> String
showsPrec :: Int -> DeleteRouteRequestParameter -> ShowS
$cshowsPrec :: Int -> DeleteRouteRequestParameter -> ShowS
Prelude.Show, (forall x.
DeleteRouteRequestParameter -> Rep DeleteRouteRequestParameter x)
-> (forall x.
Rep DeleteRouteRequestParameter x -> DeleteRouteRequestParameter)
-> Generic DeleteRouteRequestParameter
forall x.
Rep DeleteRouteRequestParameter x -> DeleteRouteRequestParameter
forall x.
DeleteRouteRequestParameter -> Rep DeleteRouteRequestParameter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteRouteRequestParameter x -> DeleteRouteRequestParameter
$cfrom :: forall x.
DeleteRouteRequestParameter -> Rep DeleteRouteRequestParameter x
Prelude.Generic)
newDeleteRouteRequestParameter ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DeleteRouteRequestParameter
newDeleteRouteRequestParameter :: Text -> Text -> Text -> DeleteRouteRequestParameter
newDeleteRouteRequestParameter
Text
pRequestParameterKey_
Text
pApiId_
Text
pRouteId_ =
DeleteRouteRequestParameter' :: Text -> Text -> Text -> DeleteRouteRequestParameter
DeleteRouteRequestParameter'
{ $sel:requestParameterKey:DeleteRouteRequestParameter' :: Text
requestParameterKey =
Text
pRequestParameterKey_,
$sel:apiId:DeleteRouteRequestParameter' :: Text
apiId = Text
pApiId_,
$sel:routeId:DeleteRouteRequestParameter' :: Text
routeId = Text
pRouteId_
}
deleteRouteRequestParameter_requestParameterKey :: Lens.Lens' DeleteRouteRequestParameter Prelude.Text
deleteRouteRequestParameter_requestParameterKey :: (Text -> f Text)
-> DeleteRouteRequestParameter -> f DeleteRouteRequestParameter
deleteRouteRequestParameter_requestParameterKey = (DeleteRouteRequestParameter -> Text)
-> (DeleteRouteRequestParameter
-> Text -> DeleteRouteRequestParameter)
-> Lens
DeleteRouteRequestParameter DeleteRouteRequestParameter Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRouteRequestParameter' {Text
requestParameterKey :: Text
$sel:requestParameterKey:DeleteRouteRequestParameter' :: DeleteRouteRequestParameter -> Text
requestParameterKey} -> Text
requestParameterKey) (\s :: DeleteRouteRequestParameter
s@DeleteRouteRequestParameter' {} Text
a -> DeleteRouteRequestParameter
s {$sel:requestParameterKey:DeleteRouteRequestParameter' :: Text
requestParameterKey = Text
a} :: DeleteRouteRequestParameter)
deleteRouteRequestParameter_apiId :: Lens.Lens' DeleteRouteRequestParameter Prelude.Text
deleteRouteRequestParameter_apiId :: (Text -> f Text)
-> DeleteRouteRequestParameter -> f DeleteRouteRequestParameter
deleteRouteRequestParameter_apiId = (DeleteRouteRequestParameter -> Text)
-> (DeleteRouteRequestParameter
-> Text -> DeleteRouteRequestParameter)
-> Lens
DeleteRouteRequestParameter DeleteRouteRequestParameter Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRouteRequestParameter' {Text
apiId :: Text
$sel:apiId:DeleteRouteRequestParameter' :: DeleteRouteRequestParameter -> Text
apiId} -> Text
apiId) (\s :: DeleteRouteRequestParameter
s@DeleteRouteRequestParameter' {} Text
a -> DeleteRouteRequestParameter
s {$sel:apiId:DeleteRouteRequestParameter' :: Text
apiId = Text
a} :: DeleteRouteRequestParameter)
deleteRouteRequestParameter_routeId :: Lens.Lens' DeleteRouteRequestParameter Prelude.Text
deleteRouteRequestParameter_routeId :: (Text -> f Text)
-> DeleteRouteRequestParameter -> f DeleteRouteRequestParameter
deleteRouteRequestParameter_routeId = (DeleteRouteRequestParameter -> Text)
-> (DeleteRouteRequestParameter
-> Text -> DeleteRouteRequestParameter)
-> Lens
DeleteRouteRequestParameter DeleteRouteRequestParameter Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRouteRequestParameter' {Text
routeId :: Text
$sel:routeId:DeleteRouteRequestParameter' :: DeleteRouteRequestParameter -> Text
routeId} -> Text
routeId) (\s :: DeleteRouteRequestParameter
s@DeleteRouteRequestParameter' {} Text
a -> DeleteRouteRequestParameter
s {$sel:routeId:DeleteRouteRequestParameter' :: Text
routeId = Text
a} :: DeleteRouteRequestParameter)
instance Core.AWSRequest DeleteRouteRequestParameter where
type
AWSResponse DeleteRouteRequestParameter =
DeleteRouteRequestParameterResponse
request :: DeleteRouteRequestParameter -> Request DeleteRouteRequestParameter
request = Service
-> DeleteRouteRequestParameter
-> Request DeleteRouteRequestParameter
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteRouteRequestParameter
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteRouteRequestParameter)))
response =
AWSResponse DeleteRouteRequestParameter
-> Logger
-> Service
-> Proxy DeleteRouteRequestParameter
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteRouteRequestParameter)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteRouteRequestParameter
DeleteRouteRequestParameterResponse
DeleteRouteRequestParameterResponse'
instance Prelude.Hashable DeleteRouteRequestParameter
instance Prelude.NFData DeleteRouteRequestParameter
instance Core.ToHeaders DeleteRouteRequestParameter where
toHeaders :: DeleteRouteRequestParameter -> [Header]
toHeaders =
[Header] -> DeleteRouteRequestParameter -> [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 DeleteRouteRequestParameter where
toPath :: DeleteRouteRequestParameter -> ByteString
toPath DeleteRouteRequestParameter' {Text
routeId :: Text
apiId :: Text
requestParameterKey :: Text
$sel:routeId:DeleteRouteRequestParameter' :: DeleteRouteRequestParameter -> Text
$sel:apiId:DeleteRouteRequestParameter' :: DeleteRouteRequestParameter -> Text
$sel:requestParameterKey:DeleteRouteRequestParameter' :: DeleteRouteRequestParameter -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/v2/apis/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
apiId,
ByteString
"/routes/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
routeId,
ByteString
"/requestparameters/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
requestParameterKey
]
instance Core.ToQuery DeleteRouteRequestParameter where
toQuery :: DeleteRouteRequestParameter -> QueryString
toQuery = QueryString -> DeleteRouteRequestParameter -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteRouteRequestParameterResponse = DeleteRouteRequestParameterResponse'
{
}
deriving (DeleteRouteRequestParameterResponse
-> DeleteRouteRequestParameterResponse -> Bool
(DeleteRouteRequestParameterResponse
-> DeleteRouteRequestParameterResponse -> Bool)
-> (DeleteRouteRequestParameterResponse
-> DeleteRouteRequestParameterResponse -> Bool)
-> Eq DeleteRouteRequestParameterResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRouteRequestParameterResponse
-> DeleteRouteRequestParameterResponse -> Bool
$c/= :: DeleteRouteRequestParameterResponse
-> DeleteRouteRequestParameterResponse -> Bool
== :: DeleteRouteRequestParameterResponse
-> DeleteRouteRequestParameterResponse -> Bool
$c== :: DeleteRouteRequestParameterResponse
-> DeleteRouteRequestParameterResponse -> Bool
Prelude.Eq, ReadPrec [DeleteRouteRequestParameterResponse]
ReadPrec DeleteRouteRequestParameterResponse
Int -> ReadS DeleteRouteRequestParameterResponse
ReadS [DeleteRouteRequestParameterResponse]
(Int -> ReadS DeleteRouteRequestParameterResponse)
-> ReadS [DeleteRouteRequestParameterResponse]
-> ReadPrec DeleteRouteRequestParameterResponse
-> ReadPrec [DeleteRouteRequestParameterResponse]
-> Read DeleteRouteRequestParameterResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRouteRequestParameterResponse]
$creadListPrec :: ReadPrec [DeleteRouteRequestParameterResponse]
readPrec :: ReadPrec DeleteRouteRequestParameterResponse
$creadPrec :: ReadPrec DeleteRouteRequestParameterResponse
readList :: ReadS [DeleteRouteRequestParameterResponse]
$creadList :: ReadS [DeleteRouteRequestParameterResponse]
readsPrec :: Int -> ReadS DeleteRouteRequestParameterResponse
$creadsPrec :: Int -> ReadS DeleteRouteRequestParameterResponse
Prelude.Read, Int -> DeleteRouteRequestParameterResponse -> ShowS
[DeleteRouteRequestParameterResponse] -> ShowS
DeleteRouteRequestParameterResponse -> String
(Int -> DeleteRouteRequestParameterResponse -> ShowS)
-> (DeleteRouteRequestParameterResponse -> String)
-> ([DeleteRouteRequestParameterResponse] -> ShowS)
-> Show DeleteRouteRequestParameterResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRouteRequestParameterResponse] -> ShowS
$cshowList :: [DeleteRouteRequestParameterResponse] -> ShowS
show :: DeleteRouteRequestParameterResponse -> String
$cshow :: DeleteRouteRequestParameterResponse -> String
showsPrec :: Int -> DeleteRouteRequestParameterResponse -> ShowS
$cshowsPrec :: Int -> DeleteRouteRequestParameterResponse -> ShowS
Prelude.Show, (forall x.
DeleteRouteRequestParameterResponse
-> Rep DeleteRouteRequestParameterResponse x)
-> (forall x.
Rep DeleteRouteRequestParameterResponse x
-> DeleteRouteRequestParameterResponse)
-> Generic DeleteRouteRequestParameterResponse
forall x.
Rep DeleteRouteRequestParameterResponse x
-> DeleteRouteRequestParameterResponse
forall x.
DeleteRouteRequestParameterResponse
-> Rep DeleteRouteRequestParameterResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteRouteRequestParameterResponse x
-> DeleteRouteRequestParameterResponse
$cfrom :: forall x.
DeleteRouteRequestParameterResponse
-> Rep DeleteRouteRequestParameterResponse x
Prelude.Generic)
newDeleteRouteRequestParameterResponse ::
DeleteRouteRequestParameterResponse
newDeleteRouteRequestParameterResponse :: DeleteRouteRequestParameterResponse
newDeleteRouteRequestParameterResponse =
DeleteRouteRequestParameterResponse
DeleteRouteRequestParameterResponse'
instance
Prelude.NFData
DeleteRouteRequestParameterResponse