{-# 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.DMS.DescribeRefreshSchemasStatus
(
describeRefreshSchemasStatus
, DescribeRefreshSchemasStatus
, drssEndpointARN
, describeRefreshSchemasStatusResponse
, DescribeRefreshSchemasStatusResponse
, drssrsRefreshSchemasStatus
, drssrsResponseStatus
) where
import Network.AWS.DMS.Types
import Network.AWS.DMS.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DescribeRefreshSchemasStatus = DescribeRefreshSchemasStatus'
{ _drssEndpointARN :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeRefreshSchemasStatus
:: Text
-> DescribeRefreshSchemasStatus
describeRefreshSchemasStatus pEndpointARN_ =
DescribeRefreshSchemasStatus' {_drssEndpointARN = pEndpointARN_}
drssEndpointARN :: Lens' DescribeRefreshSchemasStatus Text
drssEndpointARN = lens _drssEndpointARN (\ s a -> s{_drssEndpointARN = a})
instance AWSRequest DescribeRefreshSchemasStatus
where
type Rs DescribeRefreshSchemasStatus =
DescribeRefreshSchemasStatusResponse
request = postJSON dms
response
= receiveJSON
(\ s h x ->
DescribeRefreshSchemasStatusResponse' <$>
(x .?> "RefreshSchemasStatus") <*>
(pure (fromEnum s)))
instance Hashable DescribeRefreshSchemasStatus where
instance NFData DescribeRefreshSchemasStatus where
instance ToHeaders DescribeRefreshSchemasStatus where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AmazonDMSv20160101.DescribeRefreshSchemasStatus" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DescribeRefreshSchemasStatus where
toJSON DescribeRefreshSchemasStatus'{..}
= object
(catMaybes
[Just ("EndpointArn" .= _drssEndpointARN)])
instance ToPath DescribeRefreshSchemasStatus where
toPath = const "/"
instance ToQuery DescribeRefreshSchemasStatus where
toQuery = const mempty
data DescribeRefreshSchemasStatusResponse = DescribeRefreshSchemasStatusResponse'
{ _drssrsRefreshSchemasStatus :: !(Maybe RefreshSchemasStatus)
, _drssrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeRefreshSchemasStatusResponse
:: Int
-> DescribeRefreshSchemasStatusResponse
describeRefreshSchemasStatusResponse pResponseStatus_ =
DescribeRefreshSchemasStatusResponse'
{ _drssrsRefreshSchemasStatus = Nothing
, _drssrsResponseStatus = pResponseStatus_
}
drssrsRefreshSchemasStatus :: Lens' DescribeRefreshSchemasStatusResponse (Maybe RefreshSchemasStatus)
drssrsRefreshSchemasStatus = lens _drssrsRefreshSchemasStatus (\ s a -> s{_drssrsRefreshSchemasStatus = a})
drssrsResponseStatus :: Lens' DescribeRefreshSchemasStatusResponse Int
drssrsResponseStatus = lens _drssrsResponseStatus (\ s a -> s{_drssrsResponseStatus = a})
instance NFData DescribeRefreshSchemasStatusResponse
where