{-# 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.DeleteRouteSettings
(
DeleteRouteSettings (..),
newDeleteRouteSettings,
deleteRouteSettings_stageName,
deleteRouteSettings_routeKey,
deleteRouteSettings_apiId,
DeleteRouteSettingsResponse (..),
newDeleteRouteSettingsResponse,
)
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 DeleteRouteSettings = DeleteRouteSettings'
{
DeleteRouteSettings -> Text
stageName :: Prelude.Text,
DeleteRouteSettings -> Text
routeKey :: Prelude.Text,
DeleteRouteSettings -> Text
apiId :: Prelude.Text
}
deriving (DeleteRouteSettings -> DeleteRouteSettings -> Bool
(DeleteRouteSettings -> DeleteRouteSettings -> Bool)
-> (DeleteRouteSettings -> DeleteRouteSettings -> Bool)
-> Eq DeleteRouteSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRouteSettings -> DeleteRouteSettings -> Bool
$c/= :: DeleteRouteSettings -> DeleteRouteSettings -> Bool
== :: DeleteRouteSettings -> DeleteRouteSettings -> Bool
$c== :: DeleteRouteSettings -> DeleteRouteSettings -> Bool
Prelude.Eq, ReadPrec [DeleteRouteSettings]
ReadPrec DeleteRouteSettings
Int -> ReadS DeleteRouteSettings
ReadS [DeleteRouteSettings]
(Int -> ReadS DeleteRouteSettings)
-> ReadS [DeleteRouteSettings]
-> ReadPrec DeleteRouteSettings
-> ReadPrec [DeleteRouteSettings]
-> Read DeleteRouteSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRouteSettings]
$creadListPrec :: ReadPrec [DeleteRouteSettings]
readPrec :: ReadPrec DeleteRouteSettings
$creadPrec :: ReadPrec DeleteRouteSettings
readList :: ReadS [DeleteRouteSettings]
$creadList :: ReadS [DeleteRouteSettings]
readsPrec :: Int -> ReadS DeleteRouteSettings
$creadsPrec :: Int -> ReadS DeleteRouteSettings
Prelude.Read, Int -> DeleteRouteSettings -> ShowS
[DeleteRouteSettings] -> ShowS
DeleteRouteSettings -> String
(Int -> DeleteRouteSettings -> ShowS)
-> (DeleteRouteSettings -> String)
-> ([DeleteRouteSettings] -> ShowS)
-> Show DeleteRouteSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRouteSettings] -> ShowS
$cshowList :: [DeleteRouteSettings] -> ShowS
show :: DeleteRouteSettings -> String
$cshow :: DeleteRouteSettings -> String
showsPrec :: Int -> DeleteRouteSettings -> ShowS
$cshowsPrec :: Int -> DeleteRouteSettings -> ShowS
Prelude.Show, (forall x. DeleteRouteSettings -> Rep DeleteRouteSettings x)
-> (forall x. Rep DeleteRouteSettings x -> DeleteRouteSettings)
-> Generic DeleteRouteSettings
forall x. Rep DeleteRouteSettings x -> DeleteRouteSettings
forall x. DeleteRouteSettings -> Rep DeleteRouteSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteRouteSettings x -> DeleteRouteSettings
$cfrom :: forall x. DeleteRouteSettings -> Rep DeleteRouteSettings x
Prelude.Generic)
newDeleteRouteSettings ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DeleteRouteSettings
newDeleteRouteSettings :: Text -> Text -> Text -> DeleteRouteSettings
newDeleteRouteSettings Text
pStageName_ Text
pRouteKey_ Text
pApiId_ =
DeleteRouteSettings' :: Text -> Text -> Text -> DeleteRouteSettings
DeleteRouteSettings'
{ $sel:stageName:DeleteRouteSettings' :: Text
stageName = Text
pStageName_,
$sel:routeKey:DeleteRouteSettings' :: Text
routeKey = Text
pRouteKey_,
$sel:apiId:DeleteRouteSettings' :: Text
apiId = Text
pApiId_
}
deleteRouteSettings_stageName :: Lens.Lens' DeleteRouteSettings Prelude.Text
deleteRouteSettings_stageName :: (Text -> f Text) -> DeleteRouteSettings -> f DeleteRouteSettings
deleteRouteSettings_stageName = (DeleteRouteSettings -> Text)
-> (DeleteRouteSettings -> Text -> DeleteRouteSettings)
-> Lens DeleteRouteSettings DeleteRouteSettings Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRouteSettings' {Text
stageName :: Text
$sel:stageName:DeleteRouteSettings' :: DeleteRouteSettings -> Text
stageName} -> Text
stageName) (\s :: DeleteRouteSettings
s@DeleteRouteSettings' {} Text
a -> DeleteRouteSettings
s {$sel:stageName:DeleteRouteSettings' :: Text
stageName = Text
a} :: DeleteRouteSettings)
deleteRouteSettings_routeKey :: Lens.Lens' DeleteRouteSettings Prelude.Text
deleteRouteSettings_routeKey :: (Text -> f Text) -> DeleteRouteSettings -> f DeleteRouteSettings
deleteRouteSettings_routeKey = (DeleteRouteSettings -> Text)
-> (DeleteRouteSettings -> Text -> DeleteRouteSettings)
-> Lens DeleteRouteSettings DeleteRouteSettings Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRouteSettings' {Text
routeKey :: Text
$sel:routeKey:DeleteRouteSettings' :: DeleteRouteSettings -> Text
routeKey} -> Text
routeKey) (\s :: DeleteRouteSettings
s@DeleteRouteSettings' {} Text
a -> DeleteRouteSettings
s {$sel:routeKey:DeleteRouteSettings' :: Text
routeKey = Text
a} :: DeleteRouteSettings)
deleteRouteSettings_apiId :: Lens.Lens' DeleteRouteSettings Prelude.Text
deleteRouteSettings_apiId :: (Text -> f Text) -> DeleteRouteSettings -> f DeleteRouteSettings
deleteRouteSettings_apiId = (DeleteRouteSettings -> Text)
-> (DeleteRouteSettings -> Text -> DeleteRouteSettings)
-> Lens DeleteRouteSettings DeleteRouteSettings Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRouteSettings' {Text
apiId :: Text
$sel:apiId:DeleteRouteSettings' :: DeleteRouteSettings -> Text
apiId} -> Text
apiId) (\s :: DeleteRouteSettings
s@DeleteRouteSettings' {} Text
a -> DeleteRouteSettings
s {$sel:apiId:DeleteRouteSettings' :: Text
apiId = Text
a} :: DeleteRouteSettings)
instance Core.AWSRequest DeleteRouteSettings where
type
AWSResponse DeleteRouteSettings =
DeleteRouteSettingsResponse
request :: DeleteRouteSettings -> Request DeleteRouteSettings
request = Service -> DeleteRouteSettings -> Request DeleteRouteSettings
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteRouteSettings
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteRouteSettings)))
response =
AWSResponse DeleteRouteSettings
-> Logger
-> Service
-> Proxy DeleteRouteSettings
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteRouteSettings)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteRouteSettings
DeleteRouteSettingsResponse
DeleteRouteSettingsResponse'
instance Prelude.Hashable DeleteRouteSettings
instance Prelude.NFData DeleteRouteSettings
instance Core.ToHeaders DeleteRouteSettings where
toHeaders :: DeleteRouteSettings -> [Header]
toHeaders =
[Header] -> DeleteRouteSettings -> [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 DeleteRouteSettings where
toPath :: DeleteRouteSettings -> ByteString
toPath DeleteRouteSettings' {Text
apiId :: Text
routeKey :: Text
stageName :: Text
$sel:apiId:DeleteRouteSettings' :: DeleteRouteSettings -> Text
$sel:routeKey:DeleteRouteSettings' :: DeleteRouteSettings -> Text
$sel:stageName:DeleteRouteSettings' :: DeleteRouteSettings -> 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
"/stages/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
stageName,
ByteString
"/routesettings/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
routeKey
]
instance Core.ToQuery DeleteRouteSettings where
toQuery :: DeleteRouteSettings -> QueryString
toQuery = QueryString -> DeleteRouteSettings -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteRouteSettingsResponse = DeleteRouteSettingsResponse'
{
}
deriving (DeleteRouteSettingsResponse -> DeleteRouteSettingsResponse -> Bool
(DeleteRouteSettingsResponse
-> DeleteRouteSettingsResponse -> Bool)
-> (DeleteRouteSettingsResponse
-> DeleteRouteSettingsResponse -> Bool)
-> Eq DeleteRouteSettingsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRouteSettingsResponse -> DeleteRouteSettingsResponse -> Bool
$c/= :: DeleteRouteSettingsResponse -> DeleteRouteSettingsResponse -> Bool
== :: DeleteRouteSettingsResponse -> DeleteRouteSettingsResponse -> Bool
$c== :: DeleteRouteSettingsResponse -> DeleteRouteSettingsResponse -> Bool
Prelude.Eq, ReadPrec [DeleteRouteSettingsResponse]
ReadPrec DeleteRouteSettingsResponse
Int -> ReadS DeleteRouteSettingsResponse
ReadS [DeleteRouteSettingsResponse]
(Int -> ReadS DeleteRouteSettingsResponse)
-> ReadS [DeleteRouteSettingsResponse]
-> ReadPrec DeleteRouteSettingsResponse
-> ReadPrec [DeleteRouteSettingsResponse]
-> Read DeleteRouteSettingsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRouteSettingsResponse]
$creadListPrec :: ReadPrec [DeleteRouteSettingsResponse]
readPrec :: ReadPrec DeleteRouteSettingsResponse
$creadPrec :: ReadPrec DeleteRouteSettingsResponse
readList :: ReadS [DeleteRouteSettingsResponse]
$creadList :: ReadS [DeleteRouteSettingsResponse]
readsPrec :: Int -> ReadS DeleteRouteSettingsResponse
$creadsPrec :: Int -> ReadS DeleteRouteSettingsResponse
Prelude.Read, Int -> DeleteRouteSettingsResponse -> ShowS
[DeleteRouteSettingsResponse] -> ShowS
DeleteRouteSettingsResponse -> String
(Int -> DeleteRouteSettingsResponse -> ShowS)
-> (DeleteRouteSettingsResponse -> String)
-> ([DeleteRouteSettingsResponse] -> ShowS)
-> Show DeleteRouteSettingsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRouteSettingsResponse] -> ShowS
$cshowList :: [DeleteRouteSettingsResponse] -> ShowS
show :: DeleteRouteSettingsResponse -> String
$cshow :: DeleteRouteSettingsResponse -> String
showsPrec :: Int -> DeleteRouteSettingsResponse -> ShowS
$cshowsPrec :: Int -> DeleteRouteSettingsResponse -> ShowS
Prelude.Show, (forall x.
DeleteRouteSettingsResponse -> Rep DeleteRouteSettingsResponse x)
-> (forall x.
Rep DeleteRouteSettingsResponse x -> DeleteRouteSettingsResponse)
-> Generic DeleteRouteSettingsResponse
forall x.
Rep DeleteRouteSettingsResponse x -> DeleteRouteSettingsResponse
forall x.
DeleteRouteSettingsResponse -> Rep DeleteRouteSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteRouteSettingsResponse x -> DeleteRouteSettingsResponse
$cfrom :: forall x.
DeleteRouteSettingsResponse -> Rep DeleteRouteSettingsResponse x
Prelude.Generic)
newDeleteRouteSettingsResponse ::
DeleteRouteSettingsResponse
newDeleteRouteSettingsResponse :: DeleteRouteSettingsResponse
newDeleteRouteSettingsResponse =
DeleteRouteSettingsResponse
DeleteRouteSettingsResponse'
instance Prelude.NFData DeleteRouteSettingsResponse