{-# 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.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
import Amazonka.SQS.Types
data PurgeQueue = PurgeQueue'
{
PurgeQueue -> Text
queueUrl :: Prelude.Text
}
deriving (PurgeQueue -> PurgeQueue -> Bool
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]
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
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. 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' {$sel:queueUrl:PurgeQueue' :: Text
queueUrl = Text
pQueueUrl_}
purgeQueue_queueUrl :: Lens.Lens' PurgeQueue Prelude.Text
purgeQueue_queueUrl :: Lens' PurgeQueue Text
purgeQueue_queueUrl = 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 :: (Service -> Service) -> PurgeQueue -> Request PurgeQueue
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy PurgeQueue
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PurgeQueue)))
response = forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull PurgeQueueResponse
PurgeQueueResponse'
instance Prelude.Hashable PurgeQueue where
hashWithSalt :: Int -> PurgeQueue -> Int
hashWithSalt Int
_salt PurgeQueue' {Text
queueUrl :: Text
$sel:queueUrl:PurgeQueue' :: PurgeQueue -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
queueUrl
instance Prelude.NFData PurgeQueue where
rnf :: PurgeQueue -> ()
rnf PurgeQueue' {Text
queueUrl :: Text
$sel:queueUrl:PurgeQueue' :: PurgeQueue -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
queueUrl
instance Data.ToHeaders PurgeQueue where
toHeaders :: PurgeQueue -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath PurgeQueue where
toPath :: PurgeQueue -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery PurgeQueue where
toQuery :: PurgeQueue -> QueryString
toQuery PurgeQueue' {Text
queueUrl :: Text
$sel:queueUrl:PurgeQueue' :: PurgeQueue -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"PurgeQueue" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2012-11-05" :: Prelude.ByteString),
ByteString
"QueueUrl" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
queueUrl
]
data PurgeQueueResponse = PurgeQueueResponse'
{
}
deriving (PurgeQueueResponse -> PurgeQueueResponse -> Bool
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]
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
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. 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 where
rnf :: PurgeQueueResponse -> ()
rnf PurgeQueueResponse
_ = ()