{-# 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.DescribeStreamProcessor
(
describeStreamProcessor
, DescribeStreamProcessor
, dspName
, describeStreamProcessorResponse
, DescribeStreamProcessorResponse
, dsprsStatus
, dsprsSettings
, dsprsInput
, dsprsOutput
, dsprsStreamProcessorARN
, dsprsStatusMessage
, dsprsName
, dsprsCreationTimestamp
, dsprsLastUpdateTimestamp
, dsprsRoleARN
, dsprsResponseStatus
) 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 DescribeStreamProcessor = DescribeStreamProcessor'
{ _dspName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeStreamProcessor
:: Text
-> DescribeStreamProcessor
describeStreamProcessor pName_ = DescribeStreamProcessor' {_dspName = pName_}
dspName :: Lens' DescribeStreamProcessor Text
dspName = lens _dspName (\ s a -> s{_dspName = a})
instance AWSRequest DescribeStreamProcessor where
type Rs DescribeStreamProcessor =
DescribeStreamProcessorResponse
request = postJSON rekognition
response
= receiveJSON
(\ s h x ->
DescribeStreamProcessorResponse' <$>
(x .?> "Status") <*> (x .?> "Settings") <*>
(x .?> "Input")
<*> (x .?> "Output")
<*> (x .?> "StreamProcessorArn")
<*> (x .?> "StatusMessage")
<*> (x .?> "Name")
<*> (x .?> "CreationTimestamp")
<*> (x .?> "LastUpdateTimestamp")
<*> (x .?> "RoleArn")
<*> (pure (fromEnum s)))
instance Hashable DescribeStreamProcessor where
instance NFData DescribeStreamProcessor where
instance ToHeaders DescribeStreamProcessor where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("RekognitionService.DescribeStreamProcessor" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DescribeStreamProcessor where
toJSON DescribeStreamProcessor'{..}
= object (catMaybes [Just ("Name" .= _dspName)])
instance ToPath DescribeStreamProcessor where
toPath = const "/"
instance ToQuery DescribeStreamProcessor where
toQuery = const mempty
data DescribeStreamProcessorResponse = DescribeStreamProcessorResponse'
{ _dsprsStatus :: !(Maybe StreamProcessorStatus)
, _dsprsSettings :: !(Maybe StreamProcessorSettings)
, _dsprsInput :: !(Maybe StreamProcessorInput)
, _dsprsOutput :: !(Maybe StreamProcessorOutput)
, _dsprsStreamProcessorARN :: !(Maybe Text)
, _dsprsStatusMessage :: !(Maybe Text)
, _dsprsName :: !(Maybe Text)
, _dsprsCreationTimestamp :: !(Maybe POSIX)
, _dsprsLastUpdateTimestamp :: !(Maybe POSIX)
, _dsprsRoleARN :: !(Maybe Text)
, _dsprsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeStreamProcessorResponse
:: Int
-> DescribeStreamProcessorResponse
describeStreamProcessorResponse pResponseStatus_ =
DescribeStreamProcessorResponse'
{ _dsprsStatus = Nothing
, _dsprsSettings = Nothing
, _dsprsInput = Nothing
, _dsprsOutput = Nothing
, _dsprsStreamProcessorARN = Nothing
, _dsprsStatusMessage = Nothing
, _dsprsName = Nothing
, _dsprsCreationTimestamp = Nothing
, _dsprsLastUpdateTimestamp = Nothing
, _dsprsRoleARN = Nothing
, _dsprsResponseStatus = pResponseStatus_
}
dsprsStatus :: Lens' DescribeStreamProcessorResponse (Maybe StreamProcessorStatus)
dsprsStatus = lens _dsprsStatus (\ s a -> s{_dsprsStatus = a})
dsprsSettings :: Lens' DescribeStreamProcessorResponse (Maybe StreamProcessorSettings)
dsprsSettings = lens _dsprsSettings (\ s a -> s{_dsprsSettings = a})
dsprsInput :: Lens' DescribeStreamProcessorResponse (Maybe StreamProcessorInput)
dsprsInput = lens _dsprsInput (\ s a -> s{_dsprsInput = a})
dsprsOutput :: Lens' DescribeStreamProcessorResponse (Maybe StreamProcessorOutput)
dsprsOutput = lens _dsprsOutput (\ s a -> s{_dsprsOutput = a})
dsprsStreamProcessorARN :: Lens' DescribeStreamProcessorResponse (Maybe Text)
dsprsStreamProcessorARN = lens _dsprsStreamProcessorARN (\ s a -> s{_dsprsStreamProcessorARN = a})
dsprsStatusMessage :: Lens' DescribeStreamProcessorResponse (Maybe Text)
dsprsStatusMessage = lens _dsprsStatusMessage (\ s a -> s{_dsprsStatusMessage = a})
dsprsName :: Lens' DescribeStreamProcessorResponse (Maybe Text)
dsprsName = lens _dsprsName (\ s a -> s{_dsprsName = a})
dsprsCreationTimestamp :: Lens' DescribeStreamProcessorResponse (Maybe UTCTime)
dsprsCreationTimestamp = lens _dsprsCreationTimestamp (\ s a -> s{_dsprsCreationTimestamp = a}) . mapping _Time
dsprsLastUpdateTimestamp :: Lens' DescribeStreamProcessorResponse (Maybe UTCTime)
dsprsLastUpdateTimestamp = lens _dsprsLastUpdateTimestamp (\ s a -> s{_dsprsLastUpdateTimestamp = a}) . mapping _Time
dsprsRoleARN :: Lens' DescribeStreamProcessorResponse (Maybe Text)
dsprsRoleARN = lens _dsprsRoleARN (\ s a -> s{_dsprsRoleARN = a})
dsprsResponseStatus :: Lens' DescribeStreamProcessorResponse Int
dsprsResponseStatus = lens _dsprsResponseStatus (\ s a -> s{_dsprsResponseStatus = a})
instance NFData DescribeStreamProcessorResponse where