{-# 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.Rekognition.StopStreamProcessor
(
stopStreamProcessor
, StopStreamProcessor
, sspName
, stopStreamProcessorResponse
, StopStreamProcessorResponse
, ssprsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Rekognition.Types
import Network.AWS.Rekognition.Types.Product
import Network.AWS.Request
import Network.AWS.Response
newtype StopStreamProcessor = StopStreamProcessor'
{ _sspName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
stopStreamProcessor
:: Text
-> StopStreamProcessor
stopStreamProcessor pName_ = StopStreamProcessor' {_sspName = pName_}
sspName :: Lens' StopStreamProcessor Text
sspName = lens _sspName (\ s a -> s{_sspName = a})
instance AWSRequest StopStreamProcessor where
type Rs StopStreamProcessor =
StopStreamProcessorResponse
request = postJSON rekognition
response
= receiveEmpty
(\ s h x ->
StopStreamProcessorResponse' <$> (pure (fromEnum s)))
instance Hashable StopStreamProcessor where
instance NFData StopStreamProcessor where
instance ToHeaders StopStreamProcessor where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("RekognitionService.StopStreamProcessor" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON StopStreamProcessor where
toJSON StopStreamProcessor'{..}
= object (catMaybes [Just ("Name" .= _sspName)])
instance ToPath StopStreamProcessor where
toPath = const "/"
instance ToQuery StopStreamProcessor where
toQuery = const mempty
newtype StopStreamProcessorResponse = StopStreamProcessorResponse'
{ _ssprsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
stopStreamProcessorResponse
:: Int
-> StopStreamProcessorResponse
stopStreamProcessorResponse pResponseStatus_ =
StopStreamProcessorResponse' {_ssprsResponseStatus = pResponseStatus_}
ssprsResponseStatus :: Lens' StopStreamProcessorResponse Int
ssprsResponseStatus = lens _ssprsResponseStatus (\ s a -> s{_ssprsResponseStatus = a})
instance NFData StopStreamProcessorResponse where