{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.SNS.SetEndpointAttributes
(
setEndpointAttributes
, SetEndpointAttributes
, seaEndpointARN
, seaAttributes
, setEndpointAttributesResponse
, SetEndpointAttributesResponse
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.SNS.Types
import Network.AWS.SNS.Types.Product
data SetEndpointAttributes = SetEndpointAttributes'
{ _seaEndpointARN :: !Text
, _seaAttributes :: !(Map Text Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
setEndpointAttributes
:: Text
-> SetEndpointAttributes
setEndpointAttributes pEndpointARN_ =
SetEndpointAttributes'
{ _seaEndpointARN = pEndpointARN_
, _seaAttributes = mempty
}
seaEndpointARN :: Lens' SetEndpointAttributes Text
seaEndpointARN = lens _seaEndpointARN (\ s a -> s{_seaEndpointARN = a});
seaAttributes :: Lens' SetEndpointAttributes (HashMap Text Text)
seaAttributes = lens _seaAttributes (\ s a -> s{_seaAttributes = a}) . _Map;
instance AWSRequest SetEndpointAttributes where
type Rs SetEndpointAttributes =
SetEndpointAttributesResponse
request = postQuery sns
response = receiveNull SetEndpointAttributesResponse'
instance Hashable SetEndpointAttributes
instance NFData SetEndpointAttributes
instance ToHeaders SetEndpointAttributes where
toHeaders = const mempty
instance ToPath SetEndpointAttributes where
toPath = const "/"
instance ToQuery SetEndpointAttributes where
toQuery SetEndpointAttributes'{..}
= mconcat
["Action" =: ("SetEndpointAttributes" :: ByteString),
"Version" =: ("2010-03-31" :: ByteString),
"EndpointArn" =: _seaEndpointARN,
"Attributes" =:
toQueryMap "entry" "key" "value" _seaAttributes]
data SetEndpointAttributesResponse =
SetEndpointAttributesResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
setEndpointAttributesResponse
:: SetEndpointAttributesResponse
setEndpointAttributesResponse = SetEndpointAttributesResponse'
instance NFData SetEndpointAttributesResponse