{-# 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.SNS.SetSubscriptionAttributes
(
SetSubscriptionAttributes (..),
newSetSubscriptionAttributes,
setSubscriptionAttributes_attributeValue,
setSubscriptionAttributes_subscriptionArn,
setSubscriptionAttributes_attributeName,
SetSubscriptionAttributesResponse (..),
newSetSubscriptionAttributesResponse,
)
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.SNS.Types
data SetSubscriptionAttributes = SetSubscriptionAttributes'
{
SetSubscriptionAttributes -> Maybe Text
attributeValue :: Prelude.Maybe Prelude.Text,
SetSubscriptionAttributes -> Text
subscriptionArn :: Prelude.Text,
SetSubscriptionAttributes -> Text
attributeName :: Prelude.Text
}
deriving (SetSubscriptionAttributes -> SetSubscriptionAttributes -> Bool
(SetSubscriptionAttributes -> SetSubscriptionAttributes -> Bool)
-> (SetSubscriptionAttributes -> SetSubscriptionAttributes -> Bool)
-> Eq SetSubscriptionAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetSubscriptionAttributes -> SetSubscriptionAttributes -> Bool
$c/= :: SetSubscriptionAttributes -> SetSubscriptionAttributes -> Bool
== :: SetSubscriptionAttributes -> SetSubscriptionAttributes -> Bool
$c== :: SetSubscriptionAttributes -> SetSubscriptionAttributes -> Bool
Prelude.Eq, ReadPrec [SetSubscriptionAttributes]
ReadPrec SetSubscriptionAttributes
Int -> ReadS SetSubscriptionAttributes
ReadS [SetSubscriptionAttributes]
(Int -> ReadS SetSubscriptionAttributes)
-> ReadS [SetSubscriptionAttributes]
-> ReadPrec SetSubscriptionAttributes
-> ReadPrec [SetSubscriptionAttributes]
-> Read SetSubscriptionAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetSubscriptionAttributes]
$creadListPrec :: ReadPrec [SetSubscriptionAttributes]
readPrec :: ReadPrec SetSubscriptionAttributes
$creadPrec :: ReadPrec SetSubscriptionAttributes
readList :: ReadS [SetSubscriptionAttributes]
$creadList :: ReadS [SetSubscriptionAttributes]
readsPrec :: Int -> ReadS SetSubscriptionAttributes
$creadsPrec :: Int -> ReadS SetSubscriptionAttributes
Prelude.Read, Int -> SetSubscriptionAttributes -> ShowS
[SetSubscriptionAttributes] -> ShowS
SetSubscriptionAttributes -> String
(Int -> SetSubscriptionAttributes -> ShowS)
-> (SetSubscriptionAttributes -> String)
-> ([SetSubscriptionAttributes] -> ShowS)
-> Show SetSubscriptionAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetSubscriptionAttributes] -> ShowS
$cshowList :: [SetSubscriptionAttributes] -> ShowS
show :: SetSubscriptionAttributes -> String
$cshow :: SetSubscriptionAttributes -> String
showsPrec :: Int -> SetSubscriptionAttributes -> ShowS
$cshowsPrec :: Int -> SetSubscriptionAttributes -> ShowS
Prelude.Show, (forall x.
SetSubscriptionAttributes -> Rep SetSubscriptionAttributes x)
-> (forall x.
Rep SetSubscriptionAttributes x -> SetSubscriptionAttributes)
-> Generic SetSubscriptionAttributes
forall x.
Rep SetSubscriptionAttributes x -> SetSubscriptionAttributes
forall x.
SetSubscriptionAttributes -> Rep SetSubscriptionAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SetSubscriptionAttributes x -> SetSubscriptionAttributes
$cfrom :: forall x.
SetSubscriptionAttributes -> Rep SetSubscriptionAttributes x
Prelude.Generic)
newSetSubscriptionAttributes ::
Prelude.Text ->
Prelude.Text ->
SetSubscriptionAttributes
newSetSubscriptionAttributes :: Text -> Text -> SetSubscriptionAttributes
newSetSubscriptionAttributes
Text
pSubscriptionArn_
Text
pAttributeName_ =
SetSubscriptionAttributes' :: Maybe Text -> Text -> Text -> SetSubscriptionAttributes
SetSubscriptionAttributes'
{ $sel:attributeValue:SetSubscriptionAttributes' :: Maybe Text
attributeValue =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:subscriptionArn:SetSubscriptionAttributes' :: Text
subscriptionArn = Text
pSubscriptionArn_,
$sel:attributeName:SetSubscriptionAttributes' :: Text
attributeName = Text
pAttributeName_
}
setSubscriptionAttributes_attributeValue :: Lens.Lens' SetSubscriptionAttributes (Prelude.Maybe Prelude.Text)
setSubscriptionAttributes_attributeValue :: (Maybe Text -> f (Maybe Text))
-> SetSubscriptionAttributes -> f SetSubscriptionAttributes
setSubscriptionAttributes_attributeValue = (SetSubscriptionAttributes -> Maybe Text)
-> (SetSubscriptionAttributes
-> Maybe Text -> SetSubscriptionAttributes)
-> Lens
SetSubscriptionAttributes
SetSubscriptionAttributes
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetSubscriptionAttributes' {Maybe Text
attributeValue :: Maybe Text
$sel:attributeValue:SetSubscriptionAttributes' :: SetSubscriptionAttributes -> Maybe Text
attributeValue} -> Maybe Text
attributeValue) (\s :: SetSubscriptionAttributes
s@SetSubscriptionAttributes' {} Maybe Text
a -> SetSubscriptionAttributes
s {$sel:attributeValue:SetSubscriptionAttributes' :: Maybe Text
attributeValue = Maybe Text
a} :: SetSubscriptionAttributes)
setSubscriptionAttributes_subscriptionArn :: Lens.Lens' SetSubscriptionAttributes Prelude.Text
setSubscriptionAttributes_subscriptionArn :: (Text -> f Text)
-> SetSubscriptionAttributes -> f SetSubscriptionAttributes
setSubscriptionAttributes_subscriptionArn = (SetSubscriptionAttributes -> Text)
-> (SetSubscriptionAttributes -> Text -> SetSubscriptionAttributes)
-> Lens
SetSubscriptionAttributes SetSubscriptionAttributes Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetSubscriptionAttributes' {Text
subscriptionArn :: Text
$sel:subscriptionArn:SetSubscriptionAttributes' :: SetSubscriptionAttributes -> Text
subscriptionArn} -> Text
subscriptionArn) (\s :: SetSubscriptionAttributes
s@SetSubscriptionAttributes' {} Text
a -> SetSubscriptionAttributes
s {$sel:subscriptionArn:SetSubscriptionAttributes' :: Text
subscriptionArn = Text
a} :: SetSubscriptionAttributes)
setSubscriptionAttributes_attributeName :: Lens.Lens' SetSubscriptionAttributes Prelude.Text
setSubscriptionAttributes_attributeName :: (Text -> f Text)
-> SetSubscriptionAttributes -> f SetSubscriptionAttributes
setSubscriptionAttributes_attributeName = (SetSubscriptionAttributes -> Text)
-> (SetSubscriptionAttributes -> Text -> SetSubscriptionAttributes)
-> Lens
SetSubscriptionAttributes SetSubscriptionAttributes Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetSubscriptionAttributes' {Text
attributeName :: Text
$sel:attributeName:SetSubscriptionAttributes' :: SetSubscriptionAttributes -> Text
attributeName} -> Text
attributeName) (\s :: SetSubscriptionAttributes
s@SetSubscriptionAttributes' {} Text
a -> SetSubscriptionAttributes
s {$sel:attributeName:SetSubscriptionAttributes' :: Text
attributeName = Text
a} :: SetSubscriptionAttributes)
instance Core.AWSRequest SetSubscriptionAttributes where
type
AWSResponse SetSubscriptionAttributes =
SetSubscriptionAttributesResponse
request :: SetSubscriptionAttributes -> Request SetSubscriptionAttributes
request = Service
-> SetSubscriptionAttributes -> Request SetSubscriptionAttributes
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy SetSubscriptionAttributes
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SetSubscriptionAttributes)))
response =
AWSResponse SetSubscriptionAttributes
-> Logger
-> Service
-> Proxy SetSubscriptionAttributes
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SetSubscriptionAttributes)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse SetSubscriptionAttributes
SetSubscriptionAttributesResponse
SetSubscriptionAttributesResponse'
instance Prelude.Hashable SetSubscriptionAttributes
instance Prelude.NFData SetSubscriptionAttributes
instance Core.ToHeaders SetSubscriptionAttributes where
toHeaders :: SetSubscriptionAttributes -> [Header]
toHeaders = [Header] -> SetSubscriptionAttributes -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath SetSubscriptionAttributes where
toPath :: SetSubscriptionAttributes -> ByteString
toPath = ByteString -> SetSubscriptionAttributes -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery SetSubscriptionAttributes where
toQuery :: SetSubscriptionAttributes -> QueryString
toQuery SetSubscriptionAttributes' {Maybe Text
Text
attributeName :: Text
subscriptionArn :: Text
attributeValue :: Maybe Text
$sel:attributeName:SetSubscriptionAttributes' :: SetSubscriptionAttributes -> Text
$sel:subscriptionArn:SetSubscriptionAttributes' :: SetSubscriptionAttributes -> Text
$sel:attributeValue:SetSubscriptionAttributes' :: SetSubscriptionAttributes -> Maybe 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
"SetSubscriptionAttributes" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-03-31" :: Prelude.ByteString),
ByteString
"AttributeValue" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
attributeValue,
ByteString
"SubscriptionArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
subscriptionArn,
ByteString
"AttributeName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
attributeName
]
data SetSubscriptionAttributesResponse = SetSubscriptionAttributesResponse'
{
}
deriving (SetSubscriptionAttributesResponse
-> SetSubscriptionAttributesResponse -> Bool
(SetSubscriptionAttributesResponse
-> SetSubscriptionAttributesResponse -> Bool)
-> (SetSubscriptionAttributesResponse
-> SetSubscriptionAttributesResponse -> Bool)
-> Eq SetSubscriptionAttributesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetSubscriptionAttributesResponse
-> SetSubscriptionAttributesResponse -> Bool
$c/= :: SetSubscriptionAttributesResponse
-> SetSubscriptionAttributesResponse -> Bool
== :: SetSubscriptionAttributesResponse
-> SetSubscriptionAttributesResponse -> Bool
$c== :: SetSubscriptionAttributesResponse
-> SetSubscriptionAttributesResponse -> Bool
Prelude.Eq, ReadPrec [SetSubscriptionAttributesResponse]
ReadPrec SetSubscriptionAttributesResponse
Int -> ReadS SetSubscriptionAttributesResponse
ReadS [SetSubscriptionAttributesResponse]
(Int -> ReadS SetSubscriptionAttributesResponse)
-> ReadS [SetSubscriptionAttributesResponse]
-> ReadPrec SetSubscriptionAttributesResponse
-> ReadPrec [SetSubscriptionAttributesResponse]
-> Read SetSubscriptionAttributesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetSubscriptionAttributesResponse]
$creadListPrec :: ReadPrec [SetSubscriptionAttributesResponse]
readPrec :: ReadPrec SetSubscriptionAttributesResponse
$creadPrec :: ReadPrec SetSubscriptionAttributesResponse
readList :: ReadS [SetSubscriptionAttributesResponse]
$creadList :: ReadS [SetSubscriptionAttributesResponse]
readsPrec :: Int -> ReadS SetSubscriptionAttributesResponse
$creadsPrec :: Int -> ReadS SetSubscriptionAttributesResponse
Prelude.Read, Int -> SetSubscriptionAttributesResponse -> ShowS
[SetSubscriptionAttributesResponse] -> ShowS
SetSubscriptionAttributesResponse -> String
(Int -> SetSubscriptionAttributesResponse -> ShowS)
-> (SetSubscriptionAttributesResponse -> String)
-> ([SetSubscriptionAttributesResponse] -> ShowS)
-> Show SetSubscriptionAttributesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetSubscriptionAttributesResponse] -> ShowS
$cshowList :: [SetSubscriptionAttributesResponse] -> ShowS
show :: SetSubscriptionAttributesResponse -> String
$cshow :: SetSubscriptionAttributesResponse -> String
showsPrec :: Int -> SetSubscriptionAttributesResponse -> ShowS
$cshowsPrec :: Int -> SetSubscriptionAttributesResponse -> ShowS
Prelude.Show, (forall x.
SetSubscriptionAttributesResponse
-> Rep SetSubscriptionAttributesResponse x)
-> (forall x.
Rep SetSubscriptionAttributesResponse x
-> SetSubscriptionAttributesResponse)
-> Generic SetSubscriptionAttributesResponse
forall x.
Rep SetSubscriptionAttributesResponse x
-> SetSubscriptionAttributesResponse
forall x.
SetSubscriptionAttributesResponse
-> Rep SetSubscriptionAttributesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SetSubscriptionAttributesResponse x
-> SetSubscriptionAttributesResponse
$cfrom :: forall x.
SetSubscriptionAttributesResponse
-> Rep SetSubscriptionAttributesResponse x
Prelude.Generic)
newSetSubscriptionAttributesResponse ::
SetSubscriptionAttributesResponse
newSetSubscriptionAttributesResponse :: SetSubscriptionAttributesResponse
newSetSubscriptionAttributesResponse =
SetSubscriptionAttributesResponse
SetSubscriptionAttributesResponse'
instance
Prelude.NFData
SetSubscriptionAttributesResponse