module Network.AWS.SNS.SetTopicAttributes
(
SetTopicAttributes
, setTopicAttributes
, staAttributeName
, staAttributeValue
, staTopicArn
, SetTopicAttributesResponse
, setTopicAttributesResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.SNS.Types
import qualified GHC.Exts
data SetTopicAttributes = SetTopicAttributes
{ _staAttributeName :: Text
, _staAttributeValue :: Maybe Text
, _staTopicArn :: Text
} deriving (Eq, Ord, Show)
setTopicAttributes :: Text
-> Text
-> SetTopicAttributes
setTopicAttributes p1 p2 = SetTopicAttributes
{ _staTopicArn = p1
, _staAttributeName = p2
, _staAttributeValue = Nothing
}
staAttributeName :: Lens' SetTopicAttributes Text
staAttributeName = lens _staAttributeName (\s a -> s { _staAttributeName = a })
staAttributeValue :: Lens' SetTopicAttributes (Maybe Text)
staAttributeValue =
lens _staAttributeValue (\s a -> s { _staAttributeValue = a })
staTopicArn :: Lens' SetTopicAttributes Text
staTopicArn = lens _staTopicArn (\s a -> s { _staTopicArn = a })
data SetTopicAttributesResponse = SetTopicAttributesResponse
deriving (Eq, Ord, Show, Generic)
setTopicAttributesResponse :: SetTopicAttributesResponse
setTopicAttributesResponse = SetTopicAttributesResponse
instance ToPath SetTopicAttributes where
toPath = const "/"
instance ToQuery SetTopicAttributes where
toQuery SetTopicAttributes{..} = mconcat
[ "AttributeName" =? _staAttributeName
, "AttributeValue" =? _staAttributeValue
, "TopicArn" =? _staTopicArn
]
instance ToHeaders SetTopicAttributes
instance AWSRequest SetTopicAttributes where
type Sv SetTopicAttributes = SNS
type Rs SetTopicAttributes = SetTopicAttributesResponse
request = post "SetTopicAttributes"
response = nullResponse SetTopicAttributesResponse