{-# 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.KinesisAnalytics.DeleteApplicationReferenceDataSource
(
deleteApplicationReferenceDataSource
, DeleteApplicationReferenceDataSource
, dardsApplicationName
, dardsCurrentApplicationVersionId
, dardsReferenceId
, deleteApplicationReferenceDataSourceResponse
, DeleteApplicationReferenceDataSourceResponse
, dardsrsResponseStatus
) where
import Network.AWS.KinesisAnalytics.Types
import Network.AWS.KinesisAnalytics.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteApplicationReferenceDataSource = DeleteApplicationReferenceDataSource'
{ _dardsApplicationName :: !Text
, _dardsCurrentApplicationVersionId :: !Nat
, _dardsReferenceId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteApplicationReferenceDataSource
:: Text
-> Natural
-> Text
-> DeleteApplicationReferenceDataSource
deleteApplicationReferenceDataSource pApplicationName_ pCurrentApplicationVersionId_ pReferenceId_ =
DeleteApplicationReferenceDataSource'
{ _dardsApplicationName = pApplicationName_
, _dardsCurrentApplicationVersionId = _Nat # pCurrentApplicationVersionId_
, _dardsReferenceId = pReferenceId_
}
dardsApplicationName :: Lens' DeleteApplicationReferenceDataSource Text
dardsApplicationName = lens _dardsApplicationName (\ s a -> s{_dardsApplicationName = a});
dardsCurrentApplicationVersionId :: Lens' DeleteApplicationReferenceDataSource Natural
dardsCurrentApplicationVersionId = lens _dardsCurrentApplicationVersionId (\ s a -> s{_dardsCurrentApplicationVersionId = a}) . _Nat;
dardsReferenceId :: Lens' DeleteApplicationReferenceDataSource Text
dardsReferenceId = lens _dardsReferenceId (\ s a -> s{_dardsReferenceId = a});
instance AWSRequest
DeleteApplicationReferenceDataSource where
type Rs DeleteApplicationReferenceDataSource =
DeleteApplicationReferenceDataSourceResponse
request = postJSON kinesisAnalytics
response
= receiveEmpty
(\ s h x ->
DeleteApplicationReferenceDataSourceResponse' <$>
(pure (fromEnum s)))
instance Hashable
DeleteApplicationReferenceDataSource
instance NFData DeleteApplicationReferenceDataSource
instance ToHeaders
DeleteApplicationReferenceDataSource where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("KinesisAnalytics_20150814.DeleteApplicationReferenceDataSource"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteApplicationReferenceDataSource
where
toJSON DeleteApplicationReferenceDataSource'{..}
= object
(catMaybes
[Just ("ApplicationName" .= _dardsApplicationName),
Just
("CurrentApplicationVersionId" .=
_dardsCurrentApplicationVersionId),
Just ("ReferenceId" .= _dardsReferenceId)])
instance ToPath DeleteApplicationReferenceDataSource
where
toPath = const "/"
instance ToQuery DeleteApplicationReferenceDataSource
where
toQuery = const mempty
newtype DeleteApplicationReferenceDataSourceResponse = DeleteApplicationReferenceDataSourceResponse'
{ _dardsrsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteApplicationReferenceDataSourceResponse
:: Int
-> DeleteApplicationReferenceDataSourceResponse
deleteApplicationReferenceDataSourceResponse pResponseStatus_ =
DeleteApplicationReferenceDataSourceResponse'
{ _dardsrsResponseStatus = pResponseStatus_
}
dardsrsResponseStatus :: Lens' DeleteApplicationReferenceDataSourceResponse Int
dardsrsResponseStatus = lens _dardsrsResponseStatus (\ s a -> s{_dardsrsResponseStatus = a});
instance NFData
DeleteApplicationReferenceDataSourceResponse