{-# 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.DeleteApplicationOutput
(
deleteApplicationOutput
, DeleteApplicationOutput
, daoApplicationName
, daoCurrentApplicationVersionId
, daoOutputId
, deleteApplicationOutputResponse
, DeleteApplicationOutputResponse
, daorsResponseStatus
) 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 DeleteApplicationOutput = DeleteApplicationOutput'
{ _daoApplicationName :: !Text
, _daoCurrentApplicationVersionId :: !Nat
, _daoOutputId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteApplicationOutput
:: Text
-> Natural
-> Text
-> DeleteApplicationOutput
deleteApplicationOutput pApplicationName_ pCurrentApplicationVersionId_ pOutputId_ =
DeleteApplicationOutput'
{ _daoApplicationName = pApplicationName_
, _daoCurrentApplicationVersionId = _Nat # pCurrentApplicationVersionId_
, _daoOutputId = pOutputId_
}
daoApplicationName :: Lens' DeleteApplicationOutput Text
daoApplicationName = lens _daoApplicationName (\ s a -> s{_daoApplicationName = a})
daoCurrentApplicationVersionId :: Lens' DeleteApplicationOutput Natural
daoCurrentApplicationVersionId = lens _daoCurrentApplicationVersionId (\ s a -> s{_daoCurrentApplicationVersionId = a}) . _Nat
daoOutputId :: Lens' DeleteApplicationOutput Text
daoOutputId = lens _daoOutputId (\ s a -> s{_daoOutputId = a})
instance AWSRequest DeleteApplicationOutput where
type Rs DeleteApplicationOutput =
DeleteApplicationOutputResponse
request = postJSON kinesisAnalytics
response
= receiveEmpty
(\ s h x ->
DeleteApplicationOutputResponse' <$>
(pure (fromEnum s)))
instance Hashable DeleteApplicationOutput where
instance NFData DeleteApplicationOutput where
instance ToHeaders DeleteApplicationOutput where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("KinesisAnalytics_20150814.DeleteApplicationOutput"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteApplicationOutput where
toJSON DeleteApplicationOutput'{..}
= object
(catMaybes
[Just ("ApplicationName" .= _daoApplicationName),
Just
("CurrentApplicationVersionId" .=
_daoCurrentApplicationVersionId),
Just ("OutputId" .= _daoOutputId)])
instance ToPath DeleteApplicationOutput where
toPath = const "/"
instance ToQuery DeleteApplicationOutput where
toQuery = const mempty
newtype DeleteApplicationOutputResponse = DeleteApplicationOutputResponse'
{ _daorsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteApplicationOutputResponse
:: Int
-> DeleteApplicationOutputResponse
deleteApplicationOutputResponse pResponseStatus_ =
DeleteApplicationOutputResponse' {_daorsResponseStatus = pResponseStatus_}
daorsResponseStatus :: Lens' DeleteApplicationOutputResponse Int
daorsResponseStatus = lens _daorsResponseStatus (\ s a -> s{_daorsResponseStatus = a})
instance NFData DeleteApplicationOutputResponse where