{-# 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.SDB.DeleteAttributes
(
deleteAttributes
, DeleteAttributes
, daAttributes
, daExpected
, daDomainName
, daItemName
, deleteAttributesResponse
, DeleteAttributesResponse
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.SDB.Types
import Network.AWS.SDB.Types.Product
data DeleteAttributes = DeleteAttributes'
{ _daAttributes :: !(Maybe [Attribute])
, _daExpected :: !(Maybe UpdateCondition)
, _daDomainName :: !Text
, _daItemName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteAttributes
:: Text
-> Text
-> DeleteAttributes
deleteAttributes pDomainName_ pItemName_ =
DeleteAttributes'
{ _daAttributes = Nothing
, _daExpected = Nothing
, _daDomainName = pDomainName_
, _daItemName = pItemName_
}
daAttributes :: Lens' DeleteAttributes [Attribute]
daAttributes = lens _daAttributes (\ s a -> s{_daAttributes = a}) . _Default . _Coerce;
daExpected :: Lens' DeleteAttributes (Maybe UpdateCondition)
daExpected = lens _daExpected (\ s a -> s{_daExpected = a});
daDomainName :: Lens' DeleteAttributes Text
daDomainName = lens _daDomainName (\ s a -> s{_daDomainName = a});
daItemName :: Lens' DeleteAttributes Text
daItemName = lens _daItemName (\ s a -> s{_daItemName = a});
instance AWSRequest DeleteAttributes where
type Rs DeleteAttributes = DeleteAttributesResponse
request = postQuery sdb
response = receiveNull DeleteAttributesResponse'
instance Hashable DeleteAttributes
instance NFData DeleteAttributes
instance ToHeaders DeleteAttributes where
toHeaders = const mempty
instance ToPath DeleteAttributes where
toPath = const "/"
instance ToQuery DeleteAttributes where
toQuery DeleteAttributes'{..}
= mconcat
["Action" =: ("DeleteAttributes" :: ByteString),
"Version" =: ("2009-04-15" :: ByteString),
toQuery (toQueryList "Attribute" <$> _daAttributes),
"Expected" =: _daExpected,
"DomainName" =: _daDomainName,
"ItemName" =: _daItemName]
data DeleteAttributesResponse =
DeleteAttributesResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteAttributesResponse
:: DeleteAttributesResponse
deleteAttributesResponse = DeleteAttributesResponse'
instance NFData DeleteAttributesResponse