{-# 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.CloudSearch.DeleteIndexField
(
deleteIndexField
, DeleteIndexField
, difiDomainName
, difiIndexFieldName
, deleteIndexFieldResponse
, DeleteIndexFieldResponse
, difrsResponseStatus
, difrsIndexField
) where
import Network.AWS.CloudSearch.Types
import Network.AWS.CloudSearch.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteIndexField = DeleteIndexField'
{ _difiDomainName :: !Text
, _difiIndexFieldName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteIndexField
:: Text
-> Text
-> DeleteIndexField
deleteIndexField pDomainName_ pIndexFieldName_ =
DeleteIndexField'
{_difiDomainName = pDomainName_, _difiIndexFieldName = pIndexFieldName_}
difiDomainName :: Lens' DeleteIndexField Text
difiDomainName = lens _difiDomainName (\ s a -> s{_difiDomainName = a})
difiIndexFieldName :: Lens' DeleteIndexField Text
difiIndexFieldName = lens _difiIndexFieldName (\ s a -> s{_difiIndexFieldName = a})
instance AWSRequest DeleteIndexField where
type Rs DeleteIndexField = DeleteIndexFieldResponse
request = postQuery cloudSearch
response
= receiveXMLWrapper "DeleteIndexFieldResult"
(\ s h x ->
DeleteIndexFieldResponse' <$>
(pure (fromEnum s)) <*> (x .@ "IndexField"))
instance Hashable DeleteIndexField where
instance NFData DeleteIndexField where
instance ToHeaders DeleteIndexField where
toHeaders = const mempty
instance ToPath DeleteIndexField where
toPath = const "/"
instance ToQuery DeleteIndexField where
toQuery DeleteIndexField'{..}
= mconcat
["Action" =: ("DeleteIndexField" :: ByteString),
"Version" =: ("2013-01-01" :: ByteString),
"DomainName" =: _difiDomainName,
"IndexFieldName" =: _difiIndexFieldName]
data DeleteIndexFieldResponse = DeleteIndexFieldResponse'
{ _difrsResponseStatus :: !Int
, _difrsIndexField :: !IndexFieldStatus
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteIndexFieldResponse
:: Int
-> IndexFieldStatus
-> DeleteIndexFieldResponse
deleteIndexFieldResponse pResponseStatus_ pIndexField_ =
DeleteIndexFieldResponse'
{_difrsResponseStatus = pResponseStatus_, _difrsIndexField = pIndexField_}
difrsResponseStatus :: Lens' DeleteIndexFieldResponse Int
difrsResponseStatus = lens _difrsResponseStatus (\ s a -> s{_difrsResponseStatus = a})
difrsIndexField :: Lens' DeleteIndexFieldResponse IndexFieldStatus
difrsIndexField = lens _difrsIndexField (\ s a -> s{_difrsIndexField = a})
instance NFData DeleteIndexFieldResponse where