{-# 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.ChangeMessageVisibility
(
ChangeMessageVisibility (..),
newChangeMessageVisibility,
changeMessageVisibility_queueUrl,
changeMessageVisibility_receiptHandle,
changeMessageVisibility_visibilityTimeout,
ChangeMessageVisibilityResponse (..),
newChangeMessageVisibilityResponse,
)
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 ChangeMessageVisibility = ChangeMessageVisibility'
{
ChangeMessageVisibility -> Text
queueUrl :: Prelude.Text,
ChangeMessageVisibility -> Text
receiptHandle :: Prelude.Text,
ChangeMessageVisibility -> Int
visibilityTimeout :: Prelude.Int
}
deriving (ChangeMessageVisibility -> ChangeMessageVisibility -> Bool
(ChangeMessageVisibility -> ChangeMessageVisibility -> Bool)
-> (ChangeMessageVisibility -> ChangeMessageVisibility -> Bool)
-> Eq ChangeMessageVisibility
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ChangeMessageVisibility -> ChangeMessageVisibility -> Bool
== :: ChangeMessageVisibility -> ChangeMessageVisibility -> Bool
$c/= :: ChangeMessageVisibility -> ChangeMessageVisibility -> Bool
/= :: ChangeMessageVisibility -> ChangeMessageVisibility -> Bool
Prelude.Eq, ReadPrec [ChangeMessageVisibility]
ReadPrec ChangeMessageVisibility
Int -> ReadS ChangeMessageVisibility
ReadS [ChangeMessageVisibility]
(Int -> ReadS ChangeMessageVisibility)
-> ReadS [ChangeMessageVisibility]
-> ReadPrec ChangeMessageVisibility
-> ReadPrec [ChangeMessageVisibility]
-> Read ChangeMessageVisibility
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS ChangeMessageVisibility
readsPrec :: Int -> ReadS ChangeMessageVisibility
$creadList :: ReadS [ChangeMessageVisibility]
readList :: ReadS [ChangeMessageVisibility]
$creadPrec :: ReadPrec ChangeMessageVisibility
readPrec :: ReadPrec ChangeMessageVisibility
$creadListPrec :: ReadPrec [ChangeMessageVisibility]
readListPrec :: ReadPrec [ChangeMessageVisibility]
Prelude.Read, Int -> ChangeMessageVisibility -> ShowS
[ChangeMessageVisibility] -> ShowS
ChangeMessageVisibility -> String
(Int -> ChangeMessageVisibility -> ShowS)
-> (ChangeMessageVisibility -> String)
-> ([ChangeMessageVisibility] -> ShowS)
-> Show ChangeMessageVisibility
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ChangeMessageVisibility -> ShowS
showsPrec :: Int -> ChangeMessageVisibility -> ShowS
$cshow :: ChangeMessageVisibility -> String
show :: ChangeMessageVisibility -> String
$cshowList :: [ChangeMessageVisibility] -> ShowS
showList :: [ChangeMessageVisibility] -> ShowS
Prelude.Show, (forall x.
ChangeMessageVisibility -> Rep ChangeMessageVisibility x)
-> (forall x.
Rep ChangeMessageVisibility x -> ChangeMessageVisibility)
-> Generic ChangeMessageVisibility
forall x. Rep ChangeMessageVisibility x -> ChangeMessageVisibility
forall x. ChangeMessageVisibility -> Rep ChangeMessageVisibility x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. ChangeMessageVisibility -> Rep ChangeMessageVisibility x
from :: forall x. ChangeMessageVisibility -> Rep ChangeMessageVisibility x
$cto :: forall x. Rep ChangeMessageVisibility x -> ChangeMessageVisibility
to :: forall x. Rep ChangeMessageVisibility x -> ChangeMessageVisibility
Prelude.Generic)
newChangeMessageVisibility ::
Prelude.Text ->
Prelude.Text ->
Prelude.Int ->
ChangeMessageVisibility
newChangeMessageVisibility :: Text -> Text -> Int -> ChangeMessageVisibility
newChangeMessageVisibility
Text
pQueueUrl_
Text
pReceiptHandle_
Int
pVisibilityTimeout_ =
ChangeMessageVisibility'
{ $sel:queueUrl:ChangeMessageVisibility' :: Text
queueUrl = Text
pQueueUrl_,
$sel:receiptHandle:ChangeMessageVisibility' :: Text
receiptHandle = Text
pReceiptHandle_,
$sel:visibilityTimeout:ChangeMessageVisibility' :: Int
visibilityTimeout = Int
pVisibilityTimeout_
}
changeMessageVisibility_queueUrl :: Lens.Lens' ChangeMessageVisibility Prelude.Text
changeMessageVisibility_queueUrl :: Lens' ChangeMessageVisibility Text
changeMessageVisibility_queueUrl = (ChangeMessageVisibility -> Text)
-> (ChangeMessageVisibility -> Text -> ChangeMessageVisibility)
-> Lens' ChangeMessageVisibility Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangeMessageVisibility' {Text
$sel:queueUrl:ChangeMessageVisibility' :: ChangeMessageVisibility -> Text
queueUrl :: Text
queueUrl} -> Text
queueUrl) (\s :: ChangeMessageVisibility
s@ChangeMessageVisibility' {} Text
a -> ChangeMessageVisibility
s {queueUrl = a} :: ChangeMessageVisibility)
changeMessageVisibility_receiptHandle :: Lens.Lens' ChangeMessageVisibility Prelude.Text
changeMessageVisibility_receiptHandle :: Lens' ChangeMessageVisibility Text
changeMessageVisibility_receiptHandle = (ChangeMessageVisibility -> Text)
-> (ChangeMessageVisibility -> Text -> ChangeMessageVisibility)
-> Lens' ChangeMessageVisibility Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangeMessageVisibility' {Text
$sel:receiptHandle:ChangeMessageVisibility' :: ChangeMessageVisibility -> Text
receiptHandle :: Text
receiptHandle} -> Text
receiptHandle) (\s :: ChangeMessageVisibility
s@ChangeMessageVisibility' {} Text
a -> ChangeMessageVisibility
s {receiptHandle = a} :: ChangeMessageVisibility)
changeMessageVisibility_visibilityTimeout :: Lens.Lens' ChangeMessageVisibility Prelude.Int
changeMessageVisibility_visibilityTimeout :: Lens' ChangeMessageVisibility Int
changeMessageVisibility_visibilityTimeout = (ChangeMessageVisibility -> Int)
-> (ChangeMessageVisibility -> Int -> ChangeMessageVisibility)
-> Lens' ChangeMessageVisibility Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangeMessageVisibility' {Int
$sel:visibilityTimeout:ChangeMessageVisibility' :: ChangeMessageVisibility -> Int
visibilityTimeout :: Int
visibilityTimeout} -> Int
visibilityTimeout) (\s :: ChangeMessageVisibility
s@ChangeMessageVisibility' {} Int
a -> ChangeMessageVisibility
s {visibilityTimeout = a} :: ChangeMessageVisibility)
instance Core.AWSRequest ChangeMessageVisibility where
type
AWSResponse ChangeMessageVisibility =
ChangeMessageVisibilityResponse
request :: (Service -> Service)
-> ChangeMessageVisibility -> Request ChangeMessageVisibility
request Service -> Service
overrides =
Service
-> ChangeMessageVisibility -> Request ChangeMessageVisibility
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 ChangeMessageVisibility
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ChangeMessageVisibility)))
response =
AWSResponse ChangeMessageVisibility
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ChangeMessageVisibility
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ChangeMessageVisibility)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse ChangeMessageVisibility
ChangeMessageVisibilityResponse
ChangeMessageVisibilityResponse'
instance Prelude.Hashable ChangeMessageVisibility where
hashWithSalt :: Int -> ChangeMessageVisibility -> Int
hashWithSalt Int
_salt ChangeMessageVisibility' {Int
Text
$sel:queueUrl:ChangeMessageVisibility' :: ChangeMessageVisibility -> Text
$sel:receiptHandle:ChangeMessageVisibility' :: ChangeMessageVisibility -> Text
$sel:visibilityTimeout:ChangeMessageVisibility' :: ChangeMessageVisibility -> Int
queueUrl :: Text
receiptHandle :: Text
visibilityTimeout :: Int
..} =
Int
_salt
Int -> Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
queueUrl
Int -> Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
receiptHandle
Int -> Int -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Int
visibilityTimeout
instance Prelude.NFData ChangeMessageVisibility where
rnf :: ChangeMessageVisibility -> ()
rnf ChangeMessageVisibility' {Int
Text
$sel:queueUrl:ChangeMessageVisibility' :: ChangeMessageVisibility -> Text
$sel:receiptHandle:ChangeMessageVisibility' :: ChangeMessageVisibility -> Text
$sel:visibilityTimeout:ChangeMessageVisibility' :: ChangeMessageVisibility -> Int
queueUrl :: Text
receiptHandle :: Text
visibilityTimeout :: Int
..} =
Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
queueUrl
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
receiptHandle
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Int -> ()
forall a. NFData a => a -> ()
Prelude.rnf Int
visibilityTimeout
instance Data.ToHeaders ChangeMessageVisibility where
toHeaders :: ChangeMessageVisibility -> [Header]
toHeaders = [Header] -> ChangeMessageVisibility -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath ChangeMessageVisibility where
toPath :: ChangeMessageVisibility -> ByteString
toPath = ByteString -> ChangeMessageVisibility -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery ChangeMessageVisibility where
toQuery :: ChangeMessageVisibility -> QueryString
toQuery ChangeMessageVisibility' {Int
Text
$sel:queueUrl:ChangeMessageVisibility' :: ChangeMessageVisibility -> Text
$sel:receiptHandle:ChangeMessageVisibility' :: ChangeMessageVisibility -> Text
$sel:visibilityTimeout:ChangeMessageVisibility' :: ChangeMessageVisibility -> Int
queueUrl :: Text
receiptHandle :: Text
visibilityTimeout :: Int
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ChangeMessageVisibility" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2012-11-05" :: Prelude.ByteString),
ByteString
"QueueUrl" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
queueUrl,
ByteString
"ReceiptHandle" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
receiptHandle,
ByteString
"VisibilityTimeout" ByteString -> Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Int
visibilityTimeout
]
data ChangeMessageVisibilityResponse = ChangeMessageVisibilityResponse'
{
}
deriving (ChangeMessageVisibilityResponse
-> ChangeMessageVisibilityResponse -> Bool
(ChangeMessageVisibilityResponse
-> ChangeMessageVisibilityResponse -> Bool)
-> (ChangeMessageVisibilityResponse
-> ChangeMessageVisibilityResponse -> Bool)
-> Eq ChangeMessageVisibilityResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ChangeMessageVisibilityResponse
-> ChangeMessageVisibilityResponse -> Bool
== :: ChangeMessageVisibilityResponse
-> ChangeMessageVisibilityResponse -> Bool
$c/= :: ChangeMessageVisibilityResponse
-> ChangeMessageVisibilityResponse -> Bool
/= :: ChangeMessageVisibilityResponse
-> ChangeMessageVisibilityResponse -> Bool
Prelude.Eq, ReadPrec [ChangeMessageVisibilityResponse]
ReadPrec ChangeMessageVisibilityResponse
Int -> ReadS ChangeMessageVisibilityResponse
ReadS [ChangeMessageVisibilityResponse]
(Int -> ReadS ChangeMessageVisibilityResponse)
-> ReadS [ChangeMessageVisibilityResponse]
-> ReadPrec ChangeMessageVisibilityResponse
-> ReadPrec [ChangeMessageVisibilityResponse]
-> Read ChangeMessageVisibilityResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS ChangeMessageVisibilityResponse
readsPrec :: Int -> ReadS ChangeMessageVisibilityResponse
$creadList :: ReadS [ChangeMessageVisibilityResponse]
readList :: ReadS [ChangeMessageVisibilityResponse]
$creadPrec :: ReadPrec ChangeMessageVisibilityResponse
readPrec :: ReadPrec ChangeMessageVisibilityResponse
$creadListPrec :: ReadPrec [ChangeMessageVisibilityResponse]
readListPrec :: ReadPrec [ChangeMessageVisibilityResponse]
Prelude.Read, Int -> ChangeMessageVisibilityResponse -> ShowS
[ChangeMessageVisibilityResponse] -> ShowS
ChangeMessageVisibilityResponse -> String
(Int -> ChangeMessageVisibilityResponse -> ShowS)
-> (ChangeMessageVisibilityResponse -> String)
-> ([ChangeMessageVisibilityResponse] -> ShowS)
-> Show ChangeMessageVisibilityResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ChangeMessageVisibilityResponse -> ShowS
showsPrec :: Int -> ChangeMessageVisibilityResponse -> ShowS
$cshow :: ChangeMessageVisibilityResponse -> String
show :: ChangeMessageVisibilityResponse -> String
$cshowList :: [ChangeMessageVisibilityResponse] -> ShowS
showList :: [ChangeMessageVisibilityResponse] -> ShowS
Prelude.Show, (forall x.
ChangeMessageVisibilityResponse
-> Rep ChangeMessageVisibilityResponse x)
-> (forall x.
Rep ChangeMessageVisibilityResponse x
-> ChangeMessageVisibilityResponse)
-> Generic ChangeMessageVisibilityResponse
forall x.
Rep ChangeMessageVisibilityResponse x
-> ChangeMessageVisibilityResponse
forall x.
ChangeMessageVisibilityResponse
-> Rep ChangeMessageVisibilityResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
ChangeMessageVisibilityResponse
-> Rep ChangeMessageVisibilityResponse x
from :: forall x.
ChangeMessageVisibilityResponse
-> Rep ChangeMessageVisibilityResponse x
$cto :: forall x.
Rep ChangeMessageVisibilityResponse x
-> ChangeMessageVisibilityResponse
to :: forall x.
Rep ChangeMessageVisibilityResponse x
-> ChangeMessageVisibilityResponse
Prelude.Generic)
newChangeMessageVisibilityResponse ::
ChangeMessageVisibilityResponse
newChangeMessageVisibilityResponse :: ChangeMessageVisibilityResponse
newChangeMessageVisibilityResponse =
ChangeMessageVisibilityResponse
ChangeMessageVisibilityResponse'
instance
Prelude.NFData
ChangeMessageVisibilityResponse
where
rnf :: ChangeMessageVisibilityResponse -> ()
rnf ChangeMessageVisibilityResponse
_ = ()