{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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'
{ $sel:restApiId:FlushStageCache' :: Text
restApiId = Text
pRestApiId_,
$sel:stageName:FlushStageCache' :: Text
stageName = Text
pStageName_
}
flushStageCache_restApiId :: Lens.Lens' FlushStageCache Prelude.Text
flushStageCache_restApiId :: Lens' FlushStageCache Text
flushStageCache_restApiId = 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 :: Lens' FlushStageCache Text
flushStageCache_stageName = 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 :: (Service -> Service) -> FlushStageCache -> Request FlushStageCache
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy FlushStageCache
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse FlushStageCache)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull FlushStageCacheResponse
FlushStageCacheResponse'
instance Prelude.Hashable FlushStageCache where
hashWithSalt :: Int -> FlushStageCache -> Int
hashWithSalt Int
_salt FlushStageCache' {Text
stageName :: Text
restApiId :: Text
$sel:stageName:FlushStageCache' :: FlushStageCache -> Text
$sel:restApiId:FlushStageCache' :: FlushStageCache -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
restApiId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
stageName
instance Prelude.NFData FlushStageCache where
rnf :: FlushStageCache -> ()
rnf FlushStageCache' {Text
stageName :: Text
restApiId :: Text
$sel:stageName:FlushStageCache' :: FlushStageCache -> Text
$sel:restApiId:FlushStageCache' :: FlushStageCache -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
restApiId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
stageName
instance Data.ToHeaders FlushStageCache where
toHeaders :: FlushStageCache -> [Header]
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Accept"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# (ByteString
"application/json" :: Prelude.ByteString)
]
)
instance Data.ToPath FlushStageCache where
toPath :: FlushStageCache -> ByteString
toPath FlushStageCache' {Text
stageName :: Text
restApiId :: Text
$sel:stageName:FlushStageCache' :: FlushStageCache -> Text
$sel:restApiId:FlushStageCache' :: FlushStageCache -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/restapis/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
restApiId,
ByteString
"/stages/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
stageName,
ByteString
"/cache/data"
]
instance Data.ToQuery FlushStageCache where
toQuery :: FlushStageCache -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data FlushStageCacheResponse = FlushStageCacheResponse'
{
}
deriving (FlushStageCacheResponse -> FlushStageCacheResponse -> Bool
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]
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
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. 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 where
rnf :: FlushStageCacheResponse -> ()
rnf FlushStageCacheResponse
_ = ()