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