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