{-# 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.SWF.DescribeActivityType
(
describeActivityType
, DescribeActivityType
, datDomain
, datActivityType
, describeActivityTypeResponse
, DescribeActivityTypeResponse
, datrsResponseStatus
, datrsTypeInfo
, datrsConfiguration
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.SWF.Types
import Network.AWS.SWF.Types.Product
data DescribeActivityType = DescribeActivityType'
{ _datDomain :: !Text
, _datActivityType :: !ActivityType
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeActivityType
:: Text
-> ActivityType
-> DescribeActivityType
describeActivityType pDomain_ pActivityType_ =
DescribeActivityType'
{ _datDomain = pDomain_
, _datActivityType = pActivityType_
}
datDomain :: Lens' DescribeActivityType Text
datDomain = lens _datDomain (\ s a -> s{_datDomain = a});
datActivityType :: Lens' DescribeActivityType ActivityType
datActivityType = lens _datActivityType (\ s a -> s{_datActivityType = a});
instance AWSRequest DescribeActivityType where
type Rs DescribeActivityType =
DescribeActivityTypeResponse
request = postJSON swf
response
= receiveJSON
(\ s h x ->
DescribeActivityTypeResponse' <$>
(pure (fromEnum s)) <*> (x .:> "typeInfo") <*>
(x .:> "configuration"))
instance Hashable DescribeActivityType
instance NFData DescribeActivityType
instance ToHeaders DescribeActivityType where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("SimpleWorkflowService.DescribeActivityType" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.0" :: ByteString)])
instance ToJSON DescribeActivityType where
toJSON DescribeActivityType'{..}
= object
(catMaybes
[Just ("domain" .= _datDomain),
Just ("activityType" .= _datActivityType)])
instance ToPath DescribeActivityType where
toPath = const "/"
instance ToQuery DescribeActivityType where
toQuery = const mempty
data DescribeActivityTypeResponse = DescribeActivityTypeResponse'
{ _datrsResponseStatus :: !Int
, _datrsTypeInfo :: !ActivityTypeInfo
, _datrsConfiguration :: !ActivityTypeConfiguration
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeActivityTypeResponse
:: Int
-> ActivityTypeInfo
-> ActivityTypeConfiguration
-> DescribeActivityTypeResponse
describeActivityTypeResponse pResponseStatus_ pTypeInfo_ pConfiguration_ =
DescribeActivityTypeResponse'
{ _datrsResponseStatus = pResponseStatus_
, _datrsTypeInfo = pTypeInfo_
, _datrsConfiguration = pConfiguration_
}
datrsResponseStatus :: Lens' DescribeActivityTypeResponse Int
datrsResponseStatus = lens _datrsResponseStatus (\ s a -> s{_datrsResponseStatus = a});
datrsTypeInfo :: Lens' DescribeActivityTypeResponse ActivityTypeInfo
datrsTypeInfo = lens _datrsTypeInfo (\ s a -> s{_datrsTypeInfo = a});
datrsConfiguration :: Lens' DescribeActivityTypeResponse ActivityTypeConfiguration
datrsConfiguration = lens _datrsConfiguration (\ s a -> s{_datrsConfiguration = a});
instance NFData DescribeActivityTypeResponse