{-# 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.SQS.PurgeQueue
(
PurgeQueue (..),
newPurgeQueue,
purgeQueue_queueUrl,
PurgeQueueResponse (..),
newPurgeQueueResponse,
)
where
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
import Amazonka.SQS.Types
data PurgeQueue = PurgeQueue'
{
PurgeQueue -> Text
queueUrl :: Prelude.Text
}
deriving (PurgeQueue -> PurgeQueue -> Bool
(PurgeQueue -> PurgeQueue -> Bool)
-> (PurgeQueue -> PurgeQueue -> Bool) -> Eq PurgeQueue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PurgeQueue -> PurgeQueue -> Bool
$c/= :: PurgeQueue -> PurgeQueue -> Bool
== :: PurgeQueue -> PurgeQueue -> Bool
$c== :: PurgeQueue -> PurgeQueue -> Bool
Prelude.Eq, ReadPrec [PurgeQueue]
ReadPrec PurgeQueue
Int -> ReadS PurgeQueue
ReadS [PurgeQueue]
(Int -> ReadS PurgeQueue)
-> ReadS [PurgeQueue]
-> ReadPrec PurgeQueue
-> ReadPrec [PurgeQueue]
-> Read PurgeQueue
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PurgeQueue]
$creadListPrec :: ReadPrec [PurgeQueue]
readPrec :: ReadPrec PurgeQueue
$creadPrec :: ReadPrec PurgeQueue
readList :: ReadS [PurgeQueue]
$creadList :: ReadS [PurgeQueue]
readsPrec :: Int -> ReadS PurgeQueue
$creadsPrec :: Int -> ReadS PurgeQueue
Prelude.Read, Int -> PurgeQueue -> ShowS
[PurgeQueue] -> ShowS
PurgeQueue -> String
(Int -> PurgeQueue -> ShowS)
-> (PurgeQueue -> String)
-> ([PurgeQueue] -> ShowS)
-> Show PurgeQueue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PurgeQueue] -> ShowS
$cshowList :: [PurgeQueue] -> ShowS
show :: PurgeQueue -> String
$cshow :: PurgeQueue -> String
showsPrec :: Int -> PurgeQueue -> ShowS
$cshowsPrec :: Int -> PurgeQueue -> ShowS
Prelude.Show, (forall x. PurgeQueue -> Rep PurgeQueue x)
-> (forall x. Rep PurgeQueue x -> PurgeQueue) -> Generic PurgeQueue
forall x. Rep PurgeQueue x -> PurgeQueue
forall x. PurgeQueue -> Rep PurgeQueue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PurgeQueue x -> PurgeQueue
$cfrom :: forall x. PurgeQueue -> Rep PurgeQueue x
Prelude.Generic)
newPurgeQueue ::
Prelude.Text ->
PurgeQueue
newPurgeQueue :: Text -> PurgeQueue
newPurgeQueue Text
pQueueUrl_ =
PurgeQueue' :: Text -> PurgeQueue
PurgeQueue' {$sel:queueUrl:PurgeQueue' :: Text
queueUrl = Text
pQueueUrl_}
purgeQueue_queueUrl :: Lens.Lens' PurgeQueue Prelude.Text
purgeQueue_queueUrl :: (Text -> f Text) -> PurgeQueue -> f PurgeQueue
purgeQueue_queueUrl = (PurgeQueue -> Text)
-> (PurgeQueue -> Text -> PurgeQueue)
-> Lens PurgeQueue PurgeQueue Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PurgeQueue' {Text
queueUrl :: Text
$sel:queueUrl:PurgeQueue' :: PurgeQueue -> Text
queueUrl} -> Text
queueUrl) (\s :: PurgeQueue
s@PurgeQueue' {} Text
a -> PurgeQueue
s {$sel:queueUrl:PurgeQueue' :: Text
queueUrl = Text
a} :: PurgeQueue)
instance Core.AWSRequest PurgeQueue where
type AWSResponse PurgeQueue = PurgeQueueResponse
request :: PurgeQueue -> Request PurgeQueue
request = Service -> PurgeQueue -> Request PurgeQueue
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy PurgeQueue
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PurgeQueue)))
response = AWSResponse PurgeQueue
-> Logger
-> Service
-> Proxy PurgeQueue
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PurgeQueue)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse PurgeQueue
PurgeQueueResponse
PurgeQueueResponse'
instance Prelude.Hashable PurgeQueue
instance Prelude.NFData PurgeQueue
instance Core.ToHeaders PurgeQueue where
toHeaders :: PurgeQueue -> [Header]
toHeaders = [Header] -> PurgeQueue -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath PurgeQueue where
toPath :: PurgeQueue -> ByteString
toPath = ByteString -> PurgeQueue -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery PurgeQueue where
toQuery :: PurgeQueue -> QueryString
toQuery PurgeQueue' {Text
queueUrl :: Text
$sel:queueUrl:PurgeQueue' :: PurgeQueue -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"PurgeQueue" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-11-05" :: Prelude.ByteString),
ByteString
"QueueUrl" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
queueUrl
]
data PurgeQueueResponse = PurgeQueueResponse'
{
}
deriving (PurgeQueueResponse -> PurgeQueueResponse -> Bool
(PurgeQueueResponse -> PurgeQueueResponse -> Bool)
-> (PurgeQueueResponse -> PurgeQueueResponse -> Bool)
-> Eq PurgeQueueResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PurgeQueueResponse -> PurgeQueueResponse -> Bool
$c/= :: PurgeQueueResponse -> PurgeQueueResponse -> Bool
== :: PurgeQueueResponse -> PurgeQueueResponse -> Bool
$c== :: PurgeQueueResponse -> PurgeQueueResponse -> Bool
Prelude.Eq, ReadPrec [PurgeQueueResponse]
ReadPrec PurgeQueueResponse
Int -> ReadS PurgeQueueResponse
ReadS [PurgeQueueResponse]
(Int -> ReadS PurgeQueueResponse)
-> ReadS [PurgeQueueResponse]
-> ReadPrec PurgeQueueResponse
-> ReadPrec [PurgeQueueResponse]
-> Read PurgeQueueResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PurgeQueueResponse]
$creadListPrec :: ReadPrec [PurgeQueueResponse]
readPrec :: ReadPrec PurgeQueueResponse
$creadPrec :: ReadPrec PurgeQueueResponse
readList :: ReadS [PurgeQueueResponse]
$creadList :: ReadS [PurgeQueueResponse]
readsPrec :: Int -> ReadS PurgeQueueResponse
$creadsPrec :: Int -> ReadS PurgeQueueResponse
Prelude.Read, Int -> PurgeQueueResponse -> ShowS
[PurgeQueueResponse] -> ShowS
PurgeQueueResponse -> String
(Int -> PurgeQueueResponse -> ShowS)
-> (PurgeQueueResponse -> String)
-> ([PurgeQueueResponse] -> ShowS)
-> Show PurgeQueueResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PurgeQueueResponse] -> ShowS
$cshowList :: [PurgeQueueResponse] -> ShowS
show :: PurgeQueueResponse -> String
$cshow :: PurgeQueueResponse -> String
showsPrec :: Int -> PurgeQueueResponse -> ShowS
$cshowsPrec :: Int -> PurgeQueueResponse -> ShowS
Prelude.Show, (forall x. PurgeQueueResponse -> Rep PurgeQueueResponse x)
-> (forall x. Rep PurgeQueueResponse x -> PurgeQueueResponse)
-> Generic PurgeQueueResponse
forall x. Rep PurgeQueueResponse x -> PurgeQueueResponse
forall x. PurgeQueueResponse -> Rep PurgeQueueResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PurgeQueueResponse x -> PurgeQueueResponse
$cfrom :: forall x. PurgeQueueResponse -> Rep PurgeQueueResponse x
Prelude.Generic)
newPurgeQueueResponse ::
PurgeQueueResponse
newPurgeQueueResponse :: PurgeQueueResponse
newPurgeQueueResponse = PurgeQueueResponse
PurgeQueueResponse'
instance Prelude.NFData PurgeQueueResponse