{-# 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.TagQueue
(
TagQueue (..),
newTagQueue,
tagQueue_queueUrl,
tagQueue_tags,
TagQueueResponse (..),
newTagQueueResponse,
)
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 TagQueue = TagQueue'
{
TagQueue -> Text
queueUrl :: Prelude.Text,
TagQueue -> HashMap Text Text
tags :: Prelude.HashMap Prelude.Text Prelude.Text
}
deriving (TagQueue -> TagQueue -> Bool
(TagQueue -> TagQueue -> Bool)
-> (TagQueue -> TagQueue -> Bool) -> Eq TagQueue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TagQueue -> TagQueue -> Bool
$c/= :: TagQueue -> TagQueue -> Bool
== :: TagQueue -> TagQueue -> Bool
$c== :: TagQueue -> TagQueue -> Bool
Prelude.Eq, ReadPrec [TagQueue]
ReadPrec TagQueue
Int -> ReadS TagQueue
ReadS [TagQueue]
(Int -> ReadS TagQueue)
-> ReadS [TagQueue]
-> ReadPrec TagQueue
-> ReadPrec [TagQueue]
-> Read TagQueue
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TagQueue]
$creadListPrec :: ReadPrec [TagQueue]
readPrec :: ReadPrec TagQueue
$creadPrec :: ReadPrec TagQueue
readList :: ReadS [TagQueue]
$creadList :: ReadS [TagQueue]
readsPrec :: Int -> ReadS TagQueue
$creadsPrec :: Int -> ReadS TagQueue
Prelude.Read, Int -> TagQueue -> ShowS
[TagQueue] -> ShowS
TagQueue -> String
(Int -> TagQueue -> ShowS)
-> (TagQueue -> String) -> ([TagQueue] -> ShowS) -> Show TagQueue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TagQueue] -> ShowS
$cshowList :: [TagQueue] -> ShowS
show :: TagQueue -> String
$cshow :: TagQueue -> String
showsPrec :: Int -> TagQueue -> ShowS
$cshowsPrec :: Int -> TagQueue -> ShowS
Prelude.Show, (forall x. TagQueue -> Rep TagQueue x)
-> (forall x. Rep TagQueue x -> TagQueue) -> Generic TagQueue
forall x. Rep TagQueue x -> TagQueue
forall x. TagQueue -> Rep TagQueue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TagQueue x -> TagQueue
$cfrom :: forall x. TagQueue -> Rep TagQueue x
Prelude.Generic)
newTagQueue ::
Prelude.Text ->
TagQueue
newTagQueue :: Text -> TagQueue
newTagQueue Text
pQueueUrl_ =
TagQueue' :: Text -> HashMap Text Text -> TagQueue
TagQueue'
{ $sel:queueUrl:TagQueue' :: Text
queueUrl = Text
pQueueUrl_,
$sel:tags:TagQueue' :: HashMap Text Text
tags = HashMap Text Text
forall a. Monoid a => a
Prelude.mempty
}
tagQueue_queueUrl :: Lens.Lens' TagQueue Prelude.Text
tagQueue_queueUrl :: (Text -> f Text) -> TagQueue -> f TagQueue
tagQueue_queueUrl = (TagQueue -> Text)
-> (TagQueue -> Text -> TagQueue)
-> Lens TagQueue TagQueue Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagQueue' {Text
queueUrl :: Text
$sel:queueUrl:TagQueue' :: TagQueue -> Text
queueUrl} -> Text
queueUrl) (\s :: TagQueue
s@TagQueue' {} Text
a -> TagQueue
s {$sel:queueUrl:TagQueue' :: Text
queueUrl = Text
a} :: TagQueue)
tagQueue_tags :: Lens.Lens' TagQueue (Prelude.HashMap Prelude.Text Prelude.Text)
tagQueue_tags :: (HashMap Text Text -> f (HashMap Text Text))
-> TagQueue -> f TagQueue
tagQueue_tags = (TagQueue -> HashMap Text Text)
-> (TagQueue -> HashMap Text Text -> TagQueue)
-> Lens TagQueue TagQueue (HashMap Text Text) (HashMap Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagQueue' {HashMap Text Text
tags :: HashMap Text Text
$sel:tags:TagQueue' :: TagQueue -> HashMap Text Text
tags} -> HashMap Text Text
tags) (\s :: TagQueue
s@TagQueue' {} HashMap Text Text
a -> TagQueue
s {$sel:tags:TagQueue' :: HashMap Text Text
tags = HashMap Text Text
a} :: TagQueue) ((HashMap Text Text -> f (HashMap Text Text))
-> TagQueue -> f TagQueue)
-> ((HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> TagQueue
-> f TagQueue
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest TagQueue where
type AWSResponse TagQueue = TagQueueResponse
request :: TagQueue -> Request TagQueue
request = Service -> TagQueue -> Request TagQueue
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy TagQueue
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse TagQueue)))
response = AWSResponse TagQueue
-> Logger
-> Service
-> Proxy TagQueue
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse TagQueue)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse TagQueue
TagQueueResponse
TagQueueResponse'
instance Prelude.Hashable TagQueue
instance Prelude.NFData TagQueue
instance Core.ToHeaders TagQueue where
toHeaders :: TagQueue -> [Header]
toHeaders = [Header] -> TagQueue -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath TagQueue where
toPath :: TagQueue -> ByteString
toPath = ByteString -> TagQueue -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery TagQueue where
toQuery :: TagQueue -> QueryString
toQuery TagQueue' {Text
HashMap Text Text
tags :: HashMap Text Text
queueUrl :: Text
$sel:tags:TagQueue' :: TagQueue -> HashMap Text Text
$sel:queueUrl:TagQueue' :: TagQueue -> 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
"TagQueue" :: 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,
ByteString
-> ByteString -> ByteString -> HashMap Text Text -> QueryString
forall k v.
(ToQuery k, ToQuery v) =>
ByteString
-> ByteString -> ByteString -> HashMap k v -> QueryString
Core.toQueryMap ByteString
"Tags" ByteString
"Key" ByteString
"Value" HashMap Text Text
tags
]
data TagQueueResponse = TagQueueResponse'
{
}
deriving (TagQueueResponse -> TagQueueResponse -> Bool
(TagQueueResponse -> TagQueueResponse -> Bool)
-> (TagQueueResponse -> TagQueueResponse -> Bool)
-> Eq TagQueueResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TagQueueResponse -> TagQueueResponse -> Bool
$c/= :: TagQueueResponse -> TagQueueResponse -> Bool
== :: TagQueueResponse -> TagQueueResponse -> Bool
$c== :: TagQueueResponse -> TagQueueResponse -> Bool
Prelude.Eq, ReadPrec [TagQueueResponse]
ReadPrec TagQueueResponse
Int -> ReadS TagQueueResponse
ReadS [TagQueueResponse]
(Int -> ReadS TagQueueResponse)
-> ReadS [TagQueueResponse]
-> ReadPrec TagQueueResponse
-> ReadPrec [TagQueueResponse]
-> Read TagQueueResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TagQueueResponse]
$creadListPrec :: ReadPrec [TagQueueResponse]
readPrec :: ReadPrec TagQueueResponse
$creadPrec :: ReadPrec TagQueueResponse
readList :: ReadS [TagQueueResponse]
$creadList :: ReadS [TagQueueResponse]
readsPrec :: Int -> ReadS TagQueueResponse
$creadsPrec :: Int -> ReadS TagQueueResponse
Prelude.Read, Int -> TagQueueResponse -> ShowS
[TagQueueResponse] -> ShowS
TagQueueResponse -> String
(Int -> TagQueueResponse -> ShowS)
-> (TagQueueResponse -> String)
-> ([TagQueueResponse] -> ShowS)
-> Show TagQueueResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TagQueueResponse] -> ShowS
$cshowList :: [TagQueueResponse] -> ShowS
show :: TagQueueResponse -> String
$cshow :: TagQueueResponse -> String
showsPrec :: Int -> TagQueueResponse -> ShowS
$cshowsPrec :: Int -> TagQueueResponse -> ShowS
Prelude.Show, (forall x. TagQueueResponse -> Rep TagQueueResponse x)
-> (forall x. Rep TagQueueResponse x -> TagQueueResponse)
-> Generic TagQueueResponse
forall x. Rep TagQueueResponse x -> TagQueueResponse
forall x. TagQueueResponse -> Rep TagQueueResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TagQueueResponse x -> TagQueueResponse
$cfrom :: forall x. TagQueueResponse -> Rep TagQueueResponse x
Prelude.Generic)
newTagQueueResponse ::
TagQueueResponse
newTagQueueResponse :: TagQueueResponse
newTagQueueResponse = TagQueueResponse
TagQueueResponse'
instance Prelude.NFData TagQueueResponse