{-# 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.StopApplication
(
stopApplication
, StopApplication
, sApplicationName
, stopApplicationResponse
, StopApplicationResponse
, srsResponseStatus
) 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
newtype StopApplication = StopApplication'
{ _sApplicationName :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
stopApplication
:: Text
-> StopApplication
stopApplication pApplicationName_ =
StopApplication'
{ _sApplicationName = pApplicationName_
}
sApplicationName :: Lens' StopApplication Text
sApplicationName = lens _sApplicationName (\ s a -> s{_sApplicationName = a});
instance AWSRequest StopApplication where
type Rs StopApplication = StopApplicationResponse
request = postJSON kinesisAnalytics
response
= receiveEmpty
(\ s h x ->
StopApplicationResponse' <$> (pure (fromEnum s)))
instance Hashable StopApplication
instance NFData StopApplication
instance ToHeaders StopApplication where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("KinesisAnalytics_20150814.StopApplication" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON StopApplication where
toJSON StopApplication'{..}
= object
(catMaybes
[Just ("ApplicationName" .= _sApplicationName)])
instance ToPath StopApplication where
toPath = const "/"
instance ToQuery StopApplication where
toQuery = const mempty
newtype StopApplicationResponse = StopApplicationResponse'
{ _srsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
stopApplicationResponse
:: Int
-> StopApplicationResponse
stopApplicationResponse pResponseStatus_ =
StopApplicationResponse'
{ _srsResponseStatus = pResponseStatus_
}
srsResponseStatus :: Lens' StopApplicationResponse Int
srsResponseStatus = lens _srsResponseStatus (\ s a -> s{_srsResponseStatus = a});
instance NFData StopApplicationResponse